GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "gimplify.h"
#include "gimple-walk.h"
#include "tree-ssa-loop-manip.h"
#include "tree-into-ssa.h"
#include "tree-ssa.h"
#include "cfgloop.h"
#include "cfgexpand.h"
#include "tree-cfg.h"
#include "tree-dfa.h"
#include "stringpool.h"
#include "attribs.h"
#include "asan.h"
Variables | |
static hash_map< edge, auto_vec< edge_var_map > > * | edge_var_maps |
void delete_tree_ssa | ( | struct function * | fn | ) |
Deallocate memory associated with SSA data structures for FNDECL.
References gimple_df::decls_to_pointers, gimple_df::default_defs, hash_table< Descriptor, Lazy, Allocator >::empty(), gimple_df::escaped, gimple_df::escaped_return, fini_ssa_operands(), fini_ssanames(), function::gimple_df, NULL, pt_solution_reset(), redirect_edge_var_map_empty(), and ssa_operands_active().
Referenced by release_function_body(), and rest_of_clean_state().
void execute_update_addresses_taken | ( | void | ) |
Compute TREE_ADDRESSABLE and whether we have unhandled partial defs for local variables.
References as_a(), asan_mark_p(), bitmap_bit_p, bitmap_empty_p(), bitmap_set_bit, bitsizetype, build1(), build_clobber(), build_constructor(), build_vector_type(), cfun, DECL_ARGUMENTS, DECL_CHAIN, DECL_P, DECL_UID, fold_build1, fold_builtin_atomic_compare_exchange(), FOR_EACH_BB_FN, FOR_EACH_VEC_SAFE_ELT, g, gcc_assert, get_base_address(), gimple_asm_input_op(), gimple_asm_ninputs(), gimple_asm_noutputs(), gimple_asm_output_op(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs1_ptr(), gimple_assign_set_lhs(), gimple_assign_set_rhs_from_tree(), gimple_assign_set_rhs_with_ops(), gimple_assign_single_p(), gimple_build_assign(), gimple_build_call_internal(), gimple_call_arg(), gimple_call_arg_ptr(), gimple_call_internal_p(), gimple_call_num_args(), gimple_call_set_arg(), gimple_call_set_lhs(), gimple_clobber_p(), gimple_debug_bind_get_value_ptr(), gimple_debug_bind_has_value_p(), gimple_debug_bind_p(), gimple_debug_bind_reset_value(), gimple_get_lhs(), gimple_ior_addresses_taken(), gimple_location(), gimple_phi_num_args(), gimple_references_memory_p(), gimple_set_location(), gimple_set_vuse(), gimple_vuse(), walk_stmt_info::gsi, gsi_end_p(), gsi_for_stmt(), gsi_insert_before(), gsi_next(), gsi_replace(), GSI_SAME_STMT, gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, integer_zerop(), is_asan_mark_p(), is_gimple_debug(), known_ge, known_gt, LOOP_CLOSED_SSA, loops_state_satisfies_p(), make_ssa_name(), maybe_optimize_var(), maybe_rewrite_mem_ref_base(), mem_ref_offset(), non_rewritable_lvalue_p(), non_rewritable_mem_ref_base(), NULL, null_pointer_node, NULL_TREE, number_of_loops(), operand_equal_p(), optimize_atomic_compare_exchange_p(), PHI_ARG_DEF, poly_int_tree_p(), rewrite_into_loop_closed_ssa(), walk_stmt_info::stmt, suppress_warning(), timevar_pop(), timevar_push(), wi::to_poly_offset(), TODO_update_ssa, TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, tree_to_uhwi(), TREE_TYPE, TREE_VALUE, TYPE_MODE, TYPE_SIZE, TYPE_SIZE_UNIT, types_compatible_p(), unlink_stmt_vdef(), update_ssa(), update_stmt(), useless_type_conversion_p(), valid_vector_subparts_p(), VAR_P, VECTOR_TYPE_P, and wide_int_to_tree().
Referenced by execute_function_todo().
Called via walk_tree, look for SSA_NAMEs that have already been released.
References IS_TYPE_OR_DECL_P, NULL_TREE, SSA_NAME_IN_FREE_LIST, and TREE_CODE.
Referenced by insert_debug_temp_for_var_def(), and verify_loop_structure().
void flush_pending_stmts | ( | edge | e | ) |
Add PHI arguments queued in PENDING_STMT list on edge E to edge E->dest.
References add_phi_arg(), gsi_end_p(), gsi_next(), gsi_start_phis(), i, gphi_iterator::phi(), redirect_edge_var_map_clear(), redirect_edge_var_map_def(), redirect_edge_var_map_location(), and redirect_edge_var_map_vector().
Referenced by cleanup_empty_eh_merge_phis(), back_jt_path_registry::duplicate_thread_path(), fuse_loops(), gimple_duplicate_loop_body_to_header_edge(), gimple_duplicate_seme_region(), gimple_make_forwarder_block(), isolate_path(), slpeel_tree_duplicate_loop_to_edge_cfg(), ssa_redirect_edges(), transform_duplicate(), transform_to_exit_first_loop_alt(), and vect_loop_versioning().
Replace the LHS of STMT, an assignment, either a GIMPLE_ASSIGN or a GIMPLE_CALL, with NLHS, in preparation for modifying the RHS to an expression with a different value. This will update any annotations (say debug bind stmts) referring to the original LHS, so that they use the RHS instead. This is done even if NLHS and LHS are the same, for it is understood that the RHS will be modified afterwards, and NLHS will not be assigned an equivalent value. Adjusting any non-annotation uses of the LHS, if needed, is a responsibility of the caller. The effect of this call should be pretty much the same as that of inserting a copy of STMT before STMT, and then removing the original stmt, at which time gsi_remove() would have update annotations, but using this function saves all the inserting, copying and removing.
References gcc_assert, gimple_get_lhs(), gimple_set_lhs(), insert_debug_temp_for_var_def(), MAY_HAVE_DEBUG_BIND_STMTS, NULL, and SSA_NAME_DEF_STMT.
void init_tree_ssa | ( | struct function * | fn, |
int | size ) |
Initialize global DFA and SSA structures. If SIZE is non-zero allocated ssa names array of a given size.
References hash_table< Descriptor, Lazy, Allocator >::create_ggc(), gimple_df::default_defs, gimple_df::escaped, gimple_df::escaped_return, ggc_cleared_alloc(), function::gimple_df, init_ssanames(), and pt_solution_reset().
Referenced by create_assumption_fn(), create_omp_child_function(), expand_omp_taskreg(), gimplify_body(), init_lowered_empty_function(), initialize_cfun(), and input_ssa_names().
void insert_debug_temp_for_var_def | ( | gimple_stmt_iterator * | gsi, |
tree | var ) |
Insert a DEBUG BIND stmt before the DEF of VAR if VAR is referenced by other DEBUG stmts, and replace uses of the DEF with the newly-created debug temp.
References as_a(), build_debug_expr_decl(), CDI_DOMINATORS, CONSTANT_CLASS_P, DECL_MODE, DECL_P, degenerate_phi_result(), dom_info_available_p(), error_mark_node, find_released_ssa_name(), fold_stmt_inplace(), FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, gimple_assign_rhs_to_tree(), gimple_bb(), gimple_build_debug_bind(), gimple_clobber_p(), gimple_debug_bind_get_value(), gimple_debug_bind_p(), gimple_debug_bind_reset_value(), walk_stmt_info::gsi, gsi_for_stmt(), gsi_insert_before(), GSI_SAME_STMT, gsi_stmt(), is_gimple_assign(), is_gimple_reg(), MAY_HAVE_DEBUG_BIND_STMTS, name_registered_for_update_p(), NULL, SET_DECL_MODE, SET_USE, SSA_NAME_DEF_STMT, walk_stmt_info::stmt, TREE_CODE, TREE_TYPE, TYPE_MODE, unshare_expr(), update_stmt(), USE_STMT, walk_gimple_op(), and walk_tree.
Referenced by gimple_replace_ssa_lhs(), insert_debug_temps_for_defs(), and release_ssa_name_fn().
void insert_debug_temps_for_defs | ( | gimple_stmt_iterator * | gsi | ) |
Insert a DEBUG BIND stmt before STMT for each DEF referenced by other DEBUG stmts, and replace uses of the DEF with the newly-created debug temp.
References DEF_FROM_PTR, FOR_EACH_PHI_OR_STMT_DEF, walk_stmt_info::gsi, gsi_stmt(), insert_debug_temp_for_var_def(), MAY_HAVE_DEBUG_BIND_STMTS, SSA_OP_DEF, walk_stmt_info::stmt, and TREE_CODE.
Referenced by gsi_remove(), and remove_phi_node().
Return true when STMT is ASAN mark where second argument is an address of a local variable.
References ASAN_USE_AFTER_SCOPE_ATTRIBUTE, DECL_ATTRIBUTES, get_base_address(), gimple_call_arg(), gimple_call_internal_p(), is_gimple_reg(), lookup_attribute(), r, walk_stmt_info::stmt, TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, and VAR_P.
Referenced by execute_update_addresses_taken().
gimple_opt_pass * make_pass_update_address_taken | ( | gcc::context * | ctxt | ) |
void mark_ssa_maybe_undefs | ( | void | ) |
Mark as maybe_undef any SSA_NAMEs that are unsuitable as ivopts candidates for potentially involving undefined behavior.
References as_a(), cfun, dump_file, dump_flags, FOR_EACH_IMM_USE_FAST, FOR_EACH_SSA_NAME, gimple_phi_arg_edge(), gimple_phi_result(), i, is_a(), phi_arg_index_from_use(), queue, ssa_name_any_use_dominates_bb_p(), SSA_NAME_IS_VIRTUAL_OPERAND, ssa_name_maybe_undef_p(), ssa_name_set_maybe_undef(), SSA_NAME_VERSION, ssa_undefined_value_p(), TDF_DETAILS, and USE_STMT.
Referenced by init_reassoc(), loop_invariant_motion_in_fun(), tree_ssa_iv_optimize(), and tree_ssa_unswitch_loops().
|
static |
When possible, clear TREE_ADDRESSABLE bit, set or clear DECL_NOT_GIMPLE_REG_P and mark the variable VAR for conversion into SSA. Return true when updating stmts is required.
References bitmap_bit_p, bitmap_set_bit, cfun, DECL_NOT_GIMPLE_REG_P, DECL_UID, dump_file, is_gimple_reg(), is_gimple_reg_type(), is_global_var(), MAX_FIXED_MODE_SIZE, print_generic_expr(), PROP_gimple_lbitint, TREE_ADDRESSABLE, TREE_CODE, TREE_TYPE, and TYPE_PRECISION.
Referenced by execute_update_addresses_taken().
If necessary, rewrite the base of the reference tree *TP from a MEM_REF to a plain or converted symbol.
References bitmap_bit_p, bitsize_int, bitsizetype, build1(), build3(), DECL_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_UID, handled_component_p(), int_const_binop(), integer_zerop(), INTEGRAL_TYPE_P, is_gimple_reg_type(), mem_ref_offset(), wi::to_offset(), wi::to_poly_offset(), TREE_ADDRESSABLE, TREE_CODE, tree_int_cst_equal(), TREE_OPERAND, TREE_TYPE, type_has_mode_precision_p(), TYPE_PRECISION, TYPE_SIZE, TYPE_SIZE_UNIT, wi::umod_trunc(), useless_type_conversion_p(), VECTOR_TYPE_P, VOID_TYPE_P, and wide_int_to_tree().
Referenced by execute_update_addresses_taken().
For an lvalue tree LHS return true if it cannot be rewritten into SSA form. Otherwise return true.
References build_vector_type(), compare_tree_int(), DECL_P, DECL_SIZE, FLOAT_TYPE_P, integer_zerop(), INTEGRAL_TYPE_P, known_eq, known_ge, known_gt, mem_ref_offset(), operand_equal_p(), poly_int_tree_p(), wi::to_poly_offset(), TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, tree_to_uhwi(), TREE_TYPE, TYPE_MODE, TYPE_PRECISION, TYPE_SIZE, TYPE_SIZE_UNIT, types_compatible_p(), valid_vector_subparts_p(), and VECTOR_TYPE_P.
Referenced by execute_update_addresses_taken().
For a tree REF return its base if it is the base of a MEM_REF that cannot be rewritten into SSA form. Otherwise return NULL_TREE.
References DECL_P, DECL_SIZE, DECL_SIZE_UNIT, get_base_address(), integer_zerop(), INTEGRAL_TYPE_P, is_gimple_reg_type(), known_ge, known_gt, mem_ref_offset(), NULL_TREE, wi::to_offset(), wi::to_poly_offset(), TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, TREE_TYPE, type_has_mode_precision_p(), TYPE_PRECISION, TYPE_SIZE, TYPE_SIZE_UNIT, wi::umod_trunc(), useless_type_conversion_p(), VECTOR_TYPE_P, and VOID_TYPE_P.
Referenced by execute_update_addresses_taken().
Add a mapping with PHI RESULT and PHI DEF associated with edge E.
References edge_var_map::def, edge_var_maps, edge_var_map::locus, NULL, and edge_var_map::result.
Referenced by cleanup_empty_eh_merge_phis(), and ssa_redirect_edge().
void redirect_edge_var_map_clear | ( | edge | e | ) |
Clear the var mappings in edge E.
References edge_var_maps.
Referenced by cleanup_empty_eh_merge_phis(), expand_omp_for_static_chunk(), flush_pending_stmts(), make_forwarders_with_degenerate_phis(), remove_edge(), remove_forwarder_block_with_phi(), slpeel_tree_duplicate_loop_to_edge_cfg(), and ssa_redirect_edge().
Duplicate the redirected var mappings in OLDE in NEWE. This assumes a hash_map can have multiple edges mapping to the same var_map (many to one mapping), since we don't remove the previous mappings.
References edge_var_maps.
Referenced by redirect_edge_succ_nodup().
void redirect_edge_var_map_empty | ( | void | ) |
Clear the edge variable mappings.
References edge_var_maps.
Referenced by delete_tree_ssa(), execute_one_ipa_transform_pass(), execute_one_pass(), and set_function_decl().
vec< edge_var_map > * redirect_edge_var_map_vector | ( | edge | e | ) |
Return the variable mappings for a given edge. If there is none, return NULL.
References edge_var_maps, and NULL.
Referenced by expand_omp_for_static_chunk(), flush_pending_stmts(), remove_forwarder_block_with_phi(), and transform_to_exit_first_loop_alt().
void release_defs_bitset | ( | bitmap | toremove | ) |
Delete SSA DEFs for SSA versions in the TOREMOVE bitmap, removing dominated stmts before their dominators, so that release_ssa_defs stands a chance of propagating DEFs into debug bind stmts.
References bitmap_bit_p, bitmap_clear_bit(), bitmap_count_bits(), bitmap_empty_p(), bitmap_list_view(), bitmap_tree_view(), DEF_FROM_PTR, EXECUTE_IF_SET_IN_BITMAP, FOR_EACH_IMM_USE_STMT, FOR_EACH_SSA_DEF_OPERAND, walk_stmt_info::gsi, gsi_for_stmt(), gsi_remove(), i, is_gimple_debug(), names, NULL_TREE, release_defs(), remove_phi_node(), ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, SSA_OP_DEF, and walk_stmt_info::stmt.
Referenced by tree_ssa_iv_optimize().
void reset_debug_uses | ( | gimple * | stmt | ) |
Reset all debug stmts that use SSA_NAME(s) defined in STMT.
References DEF_FROM_PTR, FOR_EACH_IMM_USE_STMT, FOR_EACH_PHI_OR_STMT_DEF, gimple_debug_bind_p(), gimple_debug_bind_reset_value(), MAY_HAVE_DEBUG_BIND_STMTS, SSA_OP_DEF, walk_stmt_info::stmt, TREE_CODE, and update_stmt().
Referenced by generate_loops_for_partition(), tree_loop_interchange::interchange_loops(), tree_loop_interchange::move_code_to_inner_loop(), pcom_worker::remove_stmt(), and value_replacement().
Return true if T, as SSA_NAME, has an implicit default defined value.
References DECL_BY_REFERENCE, DECL_HARD_REGISTER, SSA_NAME_VAR, TREE_CODE, and VAR_P.
Referenced by get_constraint_for_ssa_var(), and ssa_undefined_value_p().
bool ssa_name_any_use_dominates_bb_p | ( | tree | var, |
basic_block | bb ) |
Return TRUE iff there are any non-PHI uses of VAR that dominate the end of BB. If we return TRUE and BB is a loop header, then VAR we be assumed to be defined within the loop, even if it is marked as maybe-undefined.
References CDI_DOMINATORS, dominated_by_p(), FOR_EACH_IMM_USE_FAST, gimple_bb(), is_a(), is_gimple_debug(), and USE_STMT.
Referenced by find_ssa_undef(), and mark_ssa_maybe_undefs().
edge ssa_redirect_edge | ( | edge | e, |
basic_block | dest ) |
Remove the corresponding arguments from the PHI nodes in E's destination block and redirect it to DEST. Return redirected edge. The list of removed arguments is stored in a vector accessed through edge_var_maps.
References gimple_phi_arg_def(), gimple_phi_arg_location(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), NULL_TREE, gphi_iterator::phi(), redirect_edge_succ_nodup(), redirect_edge_var_map_add(), and redirect_edge_var_map_clear().
Referenced by gimple_redirect_edge_and_branch(), gimple_try_redirect_by_replacing_jump(), redirect_eh_edge(), and vect_loop_versioning().
Return true if T, an SSA_NAME, has an undefined value. PARTIAL is what should be returned if the value is only partially undefined.
References gcc_checking_assert, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_call_internal_p(), gimple_nop_p(), is_gimple_assign(), ssa_defined_default_def_p(), SSA_NAME_DEF_STMT, ssa_undefined_value_p(), TREE_CODE, TREE_OPERAND, and virtual_operand_p().
Referenced by compute_avail(), get_undefined_value_partitions(), has_undefined_value_p(), init_dont_simulate_again(), mark_ssa_maybe_undefs(), set_ssa_val_to(), set_var_live_on_entry(), ssa_undefined_value_p(), verify_live_on_entry(), visit_phi(), vn_phi_insert(), and vn_phi_lookup().
Given a tree for an expression for which we might want to emit locations or values in debug information (generally a variable, but we might deal with other kinds of trees in the future), return the tree that should be used as the variable of a DEBUG_BIND STMT or VAR_LOCATION INSN or NOTE. Return NULL if VAR is not to be tracked.
References DECL_HAS_VALUE_EXPR_P, DECL_IGNORED_P, DECL_VALUE_EXPR, is_gimple_reg_type(), MAY_HAVE_DEBUG_BIND_STMTS, NULL_TREE, SSA_NAME_VAR, target_for_debug_bind(), TREE_CODE, TREE_TYPE, VAR_DECL_IS_VIRTUAL_OPERAND, and VAR_P.
Referenced by dv_onepart_p(), expand_debug_expr(), expand_gimple_basic_block(), insert_init_debug_bind(), insert_phi_nodes_for(), maybe_register_def(), reset_debug_binding(), ipa_param_body_adjustments::reset_debug_stmts(), rewrite_stmt(), target_for_debug_bind(), use_type(), and vt_add_function_parameter().
Strip conversions from EXP according to tree_ssa_useless_type_conversion and return the resulting expression.
References exp(), TREE_OPERAND, and tree_ssa_useless_type_conversion().
Return true if EXPR is a useless type conversion, otherwise return false.
References CONVERT_EXPR_P, error_mark_node, TREE_CODE, TREE_OPERAND, TREE_TYPE, and useless_type_conversion_p().
Referenced by gimplify_addr_expr(), gimplify_conversion(), gimplify_modify_expr_rhs(), and tree_ssa_strip_useless_type_conversions().
|
static |
Return true if the definition of SSA_NAME at block BB is malformed. STMT is the statement where SSA_NAME is created. DEFINITION_BLOCK is an array of basic blocks indexed by SSA_NAME version numbers. If DEFINITION_BLOCK[SSA_NAME_VERSION] is set, it means that the block in that array slot contains the definition of SSA_NAME. IS_VIRTUAL is true if SSA_NAME is created by a VDEF.
References DECL_BY_REFERENCE, error(), basic_block_def::index, print_generic_expr(), print_gimple_stmt(), ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_VAR, SSA_NAME_VERSION, walk_stmt_info::stmt, TDF_VOPS, TREE_CODE, and verify_ssa_name().
Referenced by verify_ssa().
|
static |
Return true if any of the arguments for PHI node PHI at block BB is malformed. DEFINITION_BLOCK is an array of basic blocks indexed by SSA_NAME version numbers. If DEFINITION_BLOCK[SSA_NAME_VERSION] is set, it means that the block in that array slot contains the definition of SSA_NAME.
References EDGE_COUNT, EDGE_PRED, error(), gimple_phi_arg_imm_use_ptr(), gimple_phi_num_args(), gimple_phi_result(), handled_component_p(), i, is_gimple_min_invariant(), NULL, NULL_TREE, basic_block_def::preds, print_generic_stmt(), print_gimple_stmt(), SSA_NAME_VERSION, TDF_MEMSYMS, TDF_VOPS, TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, USE_FROM_PTR, VAR_P, verify_ssa_name(), verify_use(), and virtual_operand_p().
Referenced by verify_ssa().
DEBUG_FUNCTION void verify_ssa | ( | bool | check_modified_stmt, |
bool | check_ssa_operands ) |
Verify common invariants in the SSA web. TODO: verify the variable annotations.
References bitmap_clear(), bitmap_set_bit, calculate_dominance_info(), CDI_DOMINATORS, cfun, dom_info_state(), DOM_NONE, ENTRY_BLOCK_PTR_FOR_FN, error(), FOR_EACH_BB_FN, FOR_EACH_EDGE, FOR_EACH_SSA_NAME, FOR_EACH_SSA_TREE_OPERAND, FOR_EACH_SSA_USE_OPERAND, free(), free_dominance_info(), gcc_assert, hash_map< KeyId, Value, Traits >::get_or_insert(), gimple_bb(), gimple_debug_bind_has_value_p(), gimple_debug_bind_p(), gimple_modified_p(), gimple_nop_p(), gimple_phi_result(), gimple_vop(), walk_stmt_info::gsi, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, walk_stmt_info::info, INTEGRAL_TYPE_P, internal_error(), last_basic_block_for_fn, need_ssa_update_p(), NULL, num_ssa_names, POINTER_TYPE_P, basic_block_def::preds, print_generic_expr(), print_gimple_stmt(), set_dom_info_availability(), ssa_default_def(), SSA_NAME_DEF_STMT, SSA_NAME_PTR_INFO, SSA_NAME_RANGE_INFO, SSA_NAME_VERSION, SSA_OP_ALL_DEFS, SSA_OP_USE, SSA_OP_VUSE, walk_stmt_info::stmt, TDF_VOPS, timevar_pop(), timevar_push(), TREE_TYPE, TREE_VISITED, USE_FROM_PTR, verify_def(), verify_phi_args(), verify_ssa_name(), verify_ssa_operands(), verify_use(), verify_vssa(), virtual_operand_p(), and visited.
Referenced by checking_verify_ssa(), execute_function_todo(), rewrite_into_loop_closed_ssa_1(), and verify_loop_closed_ssa().
Return true if SSA_NAME is malformed and mark it visited. IS_VIRTUAL is true if this SSA_NAME was found inside a virtual operand.
References cfun, error(), gimple_nop_p(), gimple_vop(), NULL_TREE, ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_IN_FREE_LIST, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, TREE_TYPE, and virtual_operand_p().
Referenced by verify_def(), verify_phi_args(), and verify_ssa().
|
static |
Return true if the use of SSA_NAME at statement STMT in block BB is malformed. DEF_BB is the block where SSA_NAME was found to be created. IDOM contains immediate dominator information for the flowgraph. CHECK_ABNORMAL is true if the caller wants to check whether this use is flowing through an abnormal edge (only used when checking PHI arguments). If NAMES_DEFINED_IN_BB is not NULL, it contains a bitmap of ssa names that are defined before STMT in basic block BB.
References bitmap_bit_p, CDI_DOMINATORS, dominated_by_p(), error(), gimple_nop_p(), basic_block_def::index, ssa_use_operand_t::loc, NULL, ssa_use_operand_t::prev, print_generic_expr(), print_gimple_stmt(), ssa_name, ssa_use_operand_t::ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, SSA_NAME_VERSION, walk_stmt_info::stmt, TDF_VOPS, TREE_VISITED, ssa_use_operand_t::use, USE_FROM_PTR, and verify_imm_links().
Referenced by verify_phi_args(), and verify_ssa().
bool verify_vssa | ( | basic_block | bb, |
tree | current_vdef, | ||
sbitmap | visited ) |
Disable warnings about missing quoting in GCC diagnostics for the verification errors. Their format strings don't follow GCC diagnostic conventions and the calls are ultimately followed by one to internal_error.
Verify virtual SSA form.
References bitmap_set_bit, error(), FOR_EACH_EDGE, get_virtual_phi(), gimple_phi_result(), gimple_vdef(), gimple_vuse(), walk_stmt_info::gsi, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), basic_block_def::index, NULL, PHI_ARG_DEF_FROM_EDGE, print_generic_expr(), print_gimple_stmt(), si, walk_stmt_info::stmt, basic_block_def::succs, TDF_VOPS, TREE_CODE, verify_vssa(), virtual_operand_p(), and visited.
Referenced by verify_ssa(), and verify_vssa().
|
static |
Miscellaneous SSA utility functions. Copyright (C) 2001-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Pointer map of variable mappings, keyed by edge.
Referenced by redirect_edge_var_map_add(), redirect_edge_var_map_clear(), redirect_edge_var_map_dup(), redirect_edge_var_map_empty(), and redirect_edge_var_map_vector().