GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "diagnostic-core.h"
#include "langhooks.h"
#include "cfganal.h"
#include "gimple-iterator.h"
#include "tree-cfg.h"
#include "tree-into-ssa.h"
#include "tree-dfa.h"
#include "tree-ssa.h"
#include "domwalk.h"
#include "statistics.h"
#include "stringpool.h"
#include "attribs.h"
#include "asan.h"
#include "attr-fnspec.h"
Data Structures | |
struct | def_blocks |
struct | mark_def_sites_global_data |
struct | common_info |
struct | var_info |
struct | var_info_hasher |
struct | ssa_name_info |
struct | dom_dfsnum |
class | rewrite_dom_walker |
class | rewrite_update_dom_walker |
class | mark_def_dom_walker |
Macros | |
#define | PERCENT(x, y) |
#define | NAME_SETS_GROWTH_FACTOR (MAX (3, num_ssa_names / 3)) |
Enumerations | |
enum | need_phi_state { NEED_PHI_STATE_UNKNOWN , NEED_PHI_STATE_NO , NEED_PHI_STATE_MAYBE } |
enum | rewrite_mode { REWRITE_ALL , REWRITE_UPDATE , REWRITE_UPDATE_REGION } |
Variables | |
static vec< tree > | block_defs_stack |
static sbitmap | old_ssa_names |
static sbitmap | new_ssa_names |
static sbitmap | interesting_blocks |
bitmap | names_to_release |
static bitmap | blocks_with_phis_to_rewrite |
static struct function * | update_ssa_initialized_fn = NULL |
static hash_table< var_info_hasher > * | var_infos |
static vec< ssa_name_info * > | info_for_ssa_name |
static unsigned | current_info_for_ssa_name_age |
static bitmap_obstack | update_ssa_obstack |
static bitmap | blocks_to_update |
static bitmap | symbols_to_rename_set |
static vec< tree > | symbols_to_rename |
static bool | iterating_old_ssa_names |
#define NAME_SETS_GROWTH_FACTOR (MAX (3, num_ssa_names / 3)) |
Growth factor for NEW_SSA_NAMES and OLD_SSA_NAMES. These sets need to grow as the callers to create_new_def_for will create new names on the fly. FIXME. Currently set to 1/3 to avoid frequent reallocations but still need to find a reasonable growth strategy.
Referenced by add_new_name_mapping(), and init_update_ssa().
#define PERCENT | ( | x, | |
y ) |
Rewrite a program in Normal form into SSA. Copyright (C) 2001-2024 Free Software Foundation, Inc. Contributed by Diego Novillo <dnovillo@redhat.com> 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/>.
Referenced by update_ssa().
enum need_phi_state |
enum rewrite_mode |
The main entry point to the SSA renamer (rewrite_blocks) may be called several times to do different, but related, tasks. Initially, we need it to rename the whole program into SSA form. At other times, we may need it to only rename into SSA newly exposed symbols. Finally, we can also call it to incrementally fix an already built SSA web.
Enumerator | |
---|---|
REWRITE_ALL | |
REWRITE_UPDATE | |
REWRITE_UPDATE_REGION |
Add a new mapping NEW_TREE -> OLD REPL_TBL. Every entry N_i in REPL_TBL represents the set of names O_1 ... O_j replaced by N_i. This is used by update_ssa and its helpers to introduce new SSA names in an already formed SSA web.
References add_to_repl_tbl(), bitmap_bit_p, bitmap_ior_into(), bitmap_set_bit, gcc_assert, gcc_checking_assert, is_new_name(), iterating_old_ssa_names, NAME_SETS_GROWTH_FACTOR, names_replaced_by(), new_ssa_names, num_ssa_names, old_ssa_names, sbitmap_resize(), SBITMAP_SIZE, SSA_NAME_VAR, and SSA_NAME_VERSION.
Referenced by create_new_def_for(), and insert_phi_nodes_for().
Add OLD to REPL_TBL[NEW_TREE].SET.
References BITMAP_ALLOC, bitmap_set_bit, get_ssa_name_ann(), ssa_name_info::repl_set, SSA_NAME_VERSION, and update_ssa_obstack.
Referenced by add_new_name_mapping().
|
static |
Clears info for SSA names.
References current_info_for_ssa_name_age, and gcc_assert.
Referenced by delete_update_ssa().
|
static |
Compares two entries of type struct dom_dfsnum by dfs_num field. Callback for qsort.
References a, b, and dom_dfsnum::dfs_num.
Referenced by prune_unused_phi_nodes().
tree create_new_def_for | ( | tree | old_name, |
gimple * | stmt, | ||
def_operand_p | def ) |
Create a new name for OLD_NAME in statement STMT and replace the operand pointed to by DEF_P with the newly created name. If DEF_P is NULL then STMT should be a GIMPLE assignment. Return the new name and register the replacement mapping <NEW, OLD> in update_ssa's tables.
References add_new_name_mapping(), bb_has_abnormal_pred(), cfun, common_info::current_def, duplicate_ssa_name(), gcc_assert, get_ssa_name_ann(), gimple_assign_set_lhs(), gimple_bb(), ssa_name_info::info, init_update_ssa(), SET_DEF, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, timevar_pop(), timevar_push(), and update_ssa_initialized_fn.
Referenced by add_exit_phi(), gimple_duplicate_bb(), sese_add_exit_phis_edge(), worker_single_copy(), and worker_single_simple().
DEBUG_FUNCTION void debug_currdefs | ( | void | ) |
Dump the current reaching definition of every symbol to stderr.
References dump_currdefs().
DEBUG_FUNCTION void debug_decl_set | ( | bitmap | set | ) |
Dump bitmap SET (assumed to contain VAR_DECLs) to FILE.
References dump_decl_set().
DEBUG_FUNCTION void debug_defs_stack | ( | int | n | ) |
Dump the renaming stack (block_defs_stack) to stderr. Traverse the stack up to a maximum of N levels. If N is -1, the whole stack is dumped. New levels are created when the dominator tree traversal used for renaming enters a new sub-tree.
References dump_defs_stack().
DEBUG_FUNCTION void debug_names_replaced_by | ( | tree | name | ) |
Dump all the names replaced by NAME to stderr.
References dump_names_replaced_by().
DEBUG_FUNCTION void debug_tree_ssa | ( | void | ) |
Dump SSA information to stderr.
References dump_tree_ssa().
DEBUG_FUNCTION void debug_tree_ssa_stats | ( | void | ) |
Dump SSA statistics on stderr.
References dump_tree_ssa_stats().
DEBUG_FUNCTION void debug_update_ssa | ( | void | ) |
Dump SSA update information to stderr.
References dump_update_ssa().
DEBUG_FUNCTION void debug_var_infos | ( | void | ) |
Dump the VAR_INFOS hash table on stderr.
References dump_var_infos().
int debug_var_infos_r | ( | var_info ** | slot, |
FILE * | file ) |
Callback for htab_traverse to dump the VAR_INFOS hash table.
References bitmap_print(), common_info::def_blocks, def_blocks::def_blocks, dump_flags, var_info::info, def_blocks::livein_blocks, def_blocks::phi_blocks, print_generic_expr(), and var_info::var.
Referenced by dump_var_infos().
void delete_update_ssa | ( | void | ) |
Deallocate data structures used for incremental SSA updates.
References BITMAP_FREE, blocks_to_update, blocks_with_phis_to_rewrite, clear_ssa_name_info(), EXECUTE_IF_SET_IN_BITMAP, fini_ssa_renamer(), i, names_to_release, new_ssa_names, NULL, old_ssa_names, release_ssa_name(), sbitmap_free(), ssa_name, symbols_to_rename, symbols_to_rename_set, and update_ssa_initialized_fn.
Referenced by copy_loop_before(), update_ssa(), and vect_do_peeling().
void dump_currdefs | ( | FILE * | file | ) |
Dump the current reaching definition of every symbol to FILE.
References common_info::current_def, get_common_info(), print_generic_expr(), and symbols_to_rename.
Referenced by debug_currdefs(), and dump_tree_ssa().
void dump_defs_stack | ( | FILE * | file, |
int | n ) |
Dump the renaming stack (block_defs_stack) to FILE. Traverse the stack up to a maximum of N levels. If N is -1, the whole stack is dumped. New levels are created when the dominator tree traversal used for renaming enters a new sub-tree.
References block_defs_stack, DECL_P, i, is_gimple_reg(), NULL_TREE, print_generic_expr(), and SSA_NAME_VAR.
Referenced by debug_defs_stack(), and dump_tree_ssa().
void dump_names_replaced_by | ( | FILE * | file, |
tree | name ) |
Dump all the names replaced by NAME to FILE.
References EXECUTE_IF_SET_IN_BITMAP, i, names_replaced_by(), print_generic_expr(), and ssa_name.
Referenced by debug_names_replaced_by(), and dump_update_ssa().
void dump_tree_ssa | ( | FILE * | file | ) |
Dump SSA information to FILE.
References current_function_decl, lang_hooks::decl_printable_name, dump_currdefs(), dump_defs_stack(), dump_tree_ssa_stats(), and dump_var_infos().
Referenced by debug_tree_ssa().
void dump_tree_ssa_stats | ( | FILE * | file | ) |
Dump SSA statistics on FILE.
References htab_statistics(), and var_infos.
Referenced by debug_tree_ssa_stats(), dump_tree_ssa(), and rewrite_blocks().
void dump_update_ssa | ( | FILE * | file | ) |
Dump SSA update information to FILE.
References bitmap_empty_p(), cfun, dump_decl_set(), dump_names_replaced_by(), EXECUTE_IF_SET_IN_BITMAP, i, names_to_release, need_ssa_update_p(), new_ssa_names, print_generic_expr(), ssa_name, and symbols_to_rename_set.
Referenced by debug_update_ssa(), and update_ssa().
void dump_var_infos | ( | FILE * | file | ) |
Dump the VAR_INFOS hash table on FILE.
References debug_var_infos_r(), and var_infos.
Referenced by debug_var_infos(), and dump_tree_ssa().
|
inlinestatic |
Return the set of blocks where variable VAR is defined and the blocks where VAR is live on entry (livein). Return NULL, if no entry is found in DEF_BLOCKS.
References common_info::def_blocks, def_blocks::def_blocks, get_common_info(), and NULL.
Referenced by insert_phi_nodes_for(), and insert_updated_phi_nodes_for().
|
static |
Among the intervals starting at the N points specified in DEFS, find the one that contains S, and return its bb_index.
References defs, and dom_dfsnum::dfs_num.
Referenced by prune_unused_phi_nodes().
|
static |
Deallocate internal data structures used by the renamer.
References bitmap_obstack_release(), cfun, NULL, update_ssa_obstack, and var_infos.
Referenced by delete_update_ssa().
|
inlinestatic |
Get access to the auxiliar information stored per SSA name or decl.
References get_ssa_name_ann(), get_var_info(), ssa_name_info::info, var_info::info, and TREE_CODE.
Referenced by rewrite_dom_walker::after_dom_children(), rewrite_update_dom_walker::after_dom_children(), dump_currdefs(), find_def_blocks_for(), get_current_def(), get_reaching_def(), mark_use_interesting(), register_new_def(), register_new_update_single(), rewrite_debug_stmt_uses(), set_current_def(), set_def_block(), and set_livein_block().
Return the current definition for VAR.
References common_info::current_def, and get_common_info().
Referenced by copy_loop_before(), maybe_add_asan_poison_write(), rename_use_op(), and vect_loop_versioning().
|
inlinestatic |
Return the set of blocks where variable VAR is defined and the blocks where VAR is live on entry (livein). If no entry is found in DEF_BLOCKS, a new one is created and returned.
References BITMAP_ALLOC, common_info::def_blocks, def_blocks::def_blocks, ssa_name_info::info, def_blocks::livein_blocks, def_blocks::phi_blocks, and update_ssa_obstack.
Referenced by mark_use_interesting(), rewrite_debug_stmt_uses(), set_def_block(), and set_livein_block().
Perform a depth-first traversal of the dominator tree looking for variables to rename. BB is the block where to start searching. Renaming is a five step process: 1- Every definition made by PHI nodes at the start of the blocks is registered as the current definition for the corresponding variable. 2- Every statement in BB is rewritten. USE and VUSE operands are rewritten with their corresponding reaching definition. DEF and VDEF targets are registered as new definitions. 3- All the PHI nodes in successor blocks of BB are visited. The argument corresponding to BB is replaced with its current reaching definition. 4- Recursively rewrite every dominator child block of BB. 5- Restore (in reverse order) the current reaching definition for every new definition introduced in this block. This is done so that when we return from the recursive call, all the current reaching definitions are restored to the names that were valid in the dominator parent of BB.
Return the current definition for variable VAR. If none is found, create a new SSA name to act as the zeroth definition for VAR.
References cfun, create_tmp_reg(), common_info::current_def, DECL_P, get_common_info(), get_or_create_ssa_default_def(), NULL_TREE, SSA_NAME_VAR, and TREE_TYPE.
Referenced by maybe_replace_use(), rewrite_add_phi_arguments(), rewrite_stmt(), and rewrite_update_phi_arguments().
|
inlinestatic |
Get the information associated with NAME.
References common_info::current_def, current_info_for_ssa_name_age, common_info::def_blocks, def_blocks::def_blocks, ssa_name_info::info, info_for_ssa_name, def_blocks::livein_blocks, common_info::need_phi_state, NEED_PHI_STATE_UNKNOWN, NULL, NULL_TREE, num_ssa_names, def_blocks::phi_blocks, and SSA_NAME_VERSION.
Referenced by add_to_repl_tbl(), create_new_def_for(), get_common_info(), maybe_replace_use_in_debug_stmt(), names_replaced_by(), and update_ssa().
Return and allocate the auxiliar information for DECL.
References DECL_UID, NULL, var_info::var, and var_infos.
Referenced by get_common_info(), maybe_replace_use_in_debug_stmt(), and update_ssa().
|
static |
Dump statistics for the hash table HTAB.
References hash_table< Descriptor, Lazy, Allocator >::collisions(), hash_table< Descriptor, Lazy, Allocator >::elements(), fmt_size_t, HOST_SIZE_T_PRINT_DEC, and hash_table< Descriptor, Lazy, Allocator >::size().
Referenced by dump_dominator_optimization_stats(), and dump_tree_ssa_stats().
|
static |
Initialize internal data needed during renaming.
References bitmap_obstack_initialize(), cfun, gcc_assert, update_ssa_obstack, var_infos, and vec_safe_length().
|
static |
Initialize data structures used for incremental SSA updates.
References bitmap_clear(), bitmap_obstack_initialize(), NAME_SETS_GROWTH_FACTOR, names_to_release, new_ssa_names, NULL, num_ssa_names, old_ssa_names, sbitmap_alloc(), update_ssa_initialized_fn, and update_ssa_obstack.
Referenced by create_new_def_for(), and update_ssa().
|
static |
Cleans up the REWRITE_THIS_STMT and REGISTER_DEFS_IN_THIS_STMT flags for all statements in basic block BB.
References gcc_checking_assert, gimple_modified_p(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), set_register_defs(), and set_rewrite_uses().
Referenced by mark_block_for_update().
|
static |
Insert PHI nodes at the dominance frontier of blocks with variable definitions. DFS contains the dominance frontier information for the flowgraph.
References BITMAP_FREE, bitmap_set_bit, CDI_DOMINATORS, cfun, compute_idf(), create_tmp_reg(), common_info::def_blocks, def_blocks::def_blocks, DEF_FROM_PTR, dominated_by_p(), FOR_EACH_HASH_TABLE_ELEMENT, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, FOR_EACH_SSA_DEF_OPERAND, FOR_EACH_SSA_NAME, FOR_EACH_VEC_ELT, gimple_bb(), i, basic_block_def::index, var_info::info, insert_phi_nodes_compare_var_infos(), insert_phi_nodes_for(), interesting_blocks, common_info::need_phi_state, NEED_PHI_STATE_NO, release_ssa_name(), SET_DEF, set_def_block(), set_livein_block(), set_register_defs(), set_rewrite_uses(), SET_USE, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_OP_DEF, TREE_TYPE, update_stmt(), var_info::var, and var_infos.
|
static |
Sort var_infos after DECL_UID of their var.
References a, b, DECL_UID, and var_info::var.
Referenced by insert_phi_nodes().
Insert PHI nodes for variable VAR using the iterated dominance frontier given in PHI_INSERTION_POINTS. If UPDATE_P is true, this function assumes that the caller is incrementally updating the existing SSA form, in which case VAR may be an SSA name instead of a symbol. PHI_INSERTION_POINTS is updated to reflect nodes that already had a PHI node for VAR. On exit, only the nodes that received a PHI node for VAR will be present in PHI_INSERTION_POINTS.
References add_new_name_mapping(), add_phi_arg(), BASIC_BLOCK_FOR_FN, dom_dfsnum::bb_index, bitmap_and_compl_into(), cfun, create_phi_node(), DECL_P, def_blocks::def_blocks, dump_file, dump_flags, duplicate_ssa_name(), EXECUTE_IF_SET_IN_BITMAP, find_def_blocks_for(), FOR_EACH_EDGE, gcc_checking_assert, gimple_build_debug_bind(), gsi_after_labels(), gsi_insert_before(), GSI_SAME_STMT, def_blocks::livein_blocks, mark_block_for_update(), mark_phi_for_rewrite(), NULL, def_blocks::phi_blocks, PHI_RESULT, basic_block_def::preds, print_generic_expr(), prune_unused_phi_nodes(), set_register_defs(), si, target_for_debug_bind(), TDF_DETAILS, TDF_SLIM, TREE_CODE, and UNKNOWN_LOCATION.
Referenced by insert_phi_nodes(), and insert_updated_phi_nodes_for().
|
static |
Sort symbols_to_rename after their DECL_UID.
References a, b, and DECL_UID.
Referenced by update_ssa().
|
static |
Insert new PHI nodes to replace VAR. DFS contains dominance frontier information. This is slightly different than the regular PHI insertion algorithm. The value of UPDATE_FLAGS controls how PHI nodes for real names (i.e., GIMPLE registers) are inserted: - If UPDATE_FLAGS == TODO_update_ssa, we are only interested in PHI nodes inside the region affected by the block that defines VAR and the blocks that define all its replacements. All these definition blocks are stored in DEF_BLOCKS[VAR]->DEF_BLOCKS. First, we compute the entry point to the region (ENTRY). This is given by the nearest common dominator to all the definition blocks. When computing the iterated dominance frontier (IDF), any block not strictly dominated by ENTRY is ignored. We then call the standard PHI insertion algorithm with the pruned IDF. - If UPDATE_FLAGS == TODO_update_ssa_full_phi, the IDF for real names is not pruned. PHI nodes are inserted at every IDF block.
References BASIC_BLOCK_FOR_FN, bitmap_clear_bit(), bitmap_empty_p(), BITMAP_FREE, CDI_DOMINATORS, cfun, compute_idf(), def_blocks::def_blocks, dominated_by_p(), ENTRY_BLOCK_PTR_FOR_FN, EXECUTE_IF_SET_IN_BITMAP, find_def_blocks_for(), FOR_EACH_EDGE, gcc_checking_assert, i, insert_phi_nodes_for(), is_old_name(), mark_block_for_update(), marked_for_renaming(), nearest_common_dominator_for_set(), NULL, NUM_FIXED_BLOCKS, basic_block_def::preds, single_succ(), TODO_update_ssa, TODO_update_ssa_full_phi, and TREE_CODE.
Referenced by update_ssa().
Return true if NAME is in NEW_SSA_NAMES.
References bitmap_bit_p, new_ssa_names, SBITMAP_SIZE, and SSA_NAME_VERSION.
Referenced by add_new_name_mapping(), rewrite_update_dom_walker::before_dom_children(), mark_def_interesting(), maybe_register_def(), and name_registered_for_update_p().
Return true if NAME is in OLD_SSA_NAMES.
References bitmap_bit_p, old_ssa_names, SBITMAP_SIZE, and SSA_NAME_VERSION.
Referenced by rewrite_update_dom_walker::before_dom_children(), insert_updated_phi_nodes_for(), maybe_register_def(), maybe_replace_use(), maybe_replace_use_in_debug_stmt(), name_registered_for_update_p(), and rewrite_update_phi_arguments().
gimple_opt_pass * make_pass_build_ssa | ( | gcc::context * | ctxt | ) |
|
static |
Mark block BB as interesting for update_ssa.
References bitmap_set_bit, blocks_to_update, gcc_checking_assert, basic_block_def::index, initialize_flags_in_bb(), and NULL.
Referenced by insert_phi_nodes_for(), insert_updated_phi_nodes_for(), mark_use_interesting(), prepare_block_for_update_1(), and prepare_def_site_for().
|
static |
Mark the definition of VAR at STMT and BB as interesting for the renamer. BLOCKS is the set of blocks that need updating.
References bitmap_bit_p, blocks_to_update, EXECUTE_IF_SET_IN_BITMAP, gcc_checking_assert, i, basic_block_def::index, is_new_name(), names_replaced_by(), set_def_block(), set_register_defs(), ssa_name, and TREE_CODE.
Referenced by prepare_block_for_update_1(), and prepare_def_site_for().
|
static |
Call back for walk_dominator_tree used to collect definition sites for every variable in the function. For every statement S in block BB: 1- Variables defined by S in the DEFS of S are marked in the bitmap KILLS. 2- If S uses a variable VAR and there is no preceding kill of VAR, then it is marked in the LIVEIN_BLOCKS bitmap associated with VAR. This information is used to determine which variables are live across block boundaries to reduce the number of PHI nodes we create.
References bitmap_bit_p, bitmap_set_bit, blocks_to_update, DECL_P, DECL_UID, FOR_EACH_SSA_TREE_OPERAND, FOR_EACH_SSA_USE_OPERAND, gcc_checking_assert, basic_block_def::index, interesting_blocks, is_gimple_debug(), NULL, register_defs_p(), rewrite_uses_p(), set_def_block(), set_livein_block(), set_register_defs(), set_rewrite_uses(), SSA_OP_ALL_DEFS, SSA_OP_ALL_USES, SSA_OP_USE, TREE_CODE, update_stmt(), and USE_FROM_PTR.
Referenced by mark_def_dom_walker::before_dom_children().
|
static |
Mark SYM for renaming.
References BITMAP_ALLOC, bitmap_set_bit, DECL_UID, NULL, symbols_to_rename, and symbols_to_rename_set.
Referenced by prepare_block_for_update_1().
|
static |
Marks phi node PHI in basic block BB for rewrite.
References bitmap_set_bit, blocks_with_phis_to_rewrite, basic_block_def::index, rewrite_uses_p(), and set_rewrite_uses().
Referenced by insert_phi_nodes_for(), and mark_use_interesting().
|
inlinestatic |
Mark the use of VAR at STMT and BB as interesting for the renamer. INSERT_PHI_P is true if we are going to insert new PHI nodes.
References as_a(), bitmap_bit_p, def_blocks::def_blocks, get_common_info(), get_def_blocks_for(), gimple_bb(), basic_block_def::index, is_gimple_debug(), mark_block_for_update(), mark_phi_for_rewrite(), set_livein_block(), and set_rewrite_uses().
Referenced by prepare_block_for_update_1(), and prepare_use_sites_for().
void mark_virtual_operand_for_renaming | ( | tree | name | ) |
Replace all uses of NAME by underlying variable and mark it for renaming. This assumes the defining statement of NAME is going to be removed.
References cfun, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, gcc_assert, mark_virtual_operands_for_renaming(), SET_USE, SSA_NAME_VAR, and VAR_DECL_IS_VIRTUAL_OPERAND.
Referenced by destroy_loop(), mark_virtual_phi_result_for_renaming(), release_last_vdef(), and sink_clobbers().
void mark_virtual_operands_for_renaming | ( | struct function * | fn | ) |
Mark virtual operands of FN for renaming by update_ssa.
References function::gimple_df, gimple_df::rename_vops, and gimple_df::ssa_renaming_needed.
Referenced by loop_distribution::execute(), execute_oacc_device_lower(), gimple_lower_bitint(), mark_virtual_operand_for_renaming(), tail_merge_optimize(), and tree_optimize_tail_calls_1().
void mark_virtual_phi_result_for_renaming | ( | gphi * | phi | ) |
Replace all uses of the virtual PHI result by its underlying variable and mark it for renaming. This assumes the PHI node is going to be removed.
References dump_file, dump_flags, gimple_phi_result(), mark_virtual_operand_for_renaming(), print_gimple_stmt(), TDF_DETAILS, and TDF_SLIM.
Referenced by destroy_loop(), eliminate_unnecessary_stmts(), release_last_vdef(), and split_function().
Return true if SYM is marked for renaming.
References bitmap_bit_p, DECL_UID, NULL_TREE, and symbols_to_rename_set.
Referenced by rewrite_update_dom_walker::before_dom_children(), insert_updated_phi_nodes_for(), maybe_register_def(), maybe_replace_use(), maybe_replace_use_in_debug_stmt(), rewrite_update_phi_arguments(), and update_ssa().
|
static |
If DEF has x_5 = ASAN_POISON () as its current def, add ASAN_POISON_USE (x_5) stmt before GSI to denote the stmt writes into a poisoned (out of scope) variable.
References get_current_def(), gimple_build_call_internal(), gimple_call_internal_p(), gimple_location(), gimple_set_location(), gsi_insert_before(), GSI_SAME_STMT, gsi_stmt(), NULL, SSA_NAME_DEF_STMT, and TREE_CODE.
Referenced by maybe_register_def().
|
inlinestatic |
If the operand pointed to by DEF_P is an SSA name in NEW_SSA_NAMES or OLD_SSA_NAMES, or if it is a symbol marked for renaming, register it as the current definition for the names replaced by DEF_P. Returns whether the statement should be removed.
References asan_sanitize_use_after_scope(), cfun, create_tmp_reg(), DECL_P, DEF_FROM_PTR, EXIT_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, gcc_checking_assert, get_or_create_ssa_default_def(), gimple_build_debug_bind(), gimple_clobber_p(), gimple_seq_empty_p(), gsi_bb(), gsi_insert_after(), gsi_insert_on_edge_immediate(), gsi_one_before_end_p(), GSI_SAME_STMT, is_gimple_reg(), is_new_name(), is_old_name(), make_ssa_name(), marked_for_renaming(), maybe_add_asan_poison_write(), names_replaced_by(), NULL, phi_nodes(), register_new_update_set(), register_new_update_single(), SET_DEF, single_pred_p(), SSA_NAME_VAR, stmt_ends_bb_p(), basic_block_def::succs, target_for_debug_bind(), TREE_TYPE, and VAR_P.
Referenced by rewrite_update_stmt().
|
inlinestatic |
If the operand pointed to by USE_P is a name in OLD_SSA_NAMES or it is a symbol marked for renaming, replace it with USE_P's current reaching definition.
References DECL_P, get_reaching_def(), is_old_name(), marked_for_renaming(), NULL_TREE, SET_USE, SSA_NAME_VAR, and USE_FROM_PTR.
Referenced by rewrite_update_stmt().
|
inlinestatic |
Same as maybe_replace_use, but without introducing default stmts, returning false to indicate a need to do so.
References common_info::current_def, DECL_P, get_ssa_name_ann(), get_var_info(), ssa_name_info::info, var_info::info, is_old_name(), marked_for_renaming(), NULL_TREE, SET_USE, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, and USE_FROM_PTR.
Referenced by rewrite_update_stmt().
Return true if name N has been registered in the replacement table.
References cfun, gcc_assert, is_new_name(), is_old_name(), and update_ssa_initialized_fn.
Referenced by follow_copies_to_constant(), get_range_strlen(), gimple_can_merge_blocks_p(), insert_debug_temp_for_var_def(), integer_valued_real_single_p(), release_ssa_name_fn(), tree_single_nonnegative_warnv_p(), and walk_ssa_copies().
Return the names replaced by NEW_TREE (i.e., REPL_TBL[NEW_TREE].SET).
References get_ssa_name_ann(), and ssa_name_info::repl_set.
Referenced by add_new_name_mapping(), rewrite_update_dom_walker::before_dom_children(), dump_names_replaced_by(), mark_def_interesting(), and maybe_register_def().
Return true if there is any work to be done by update_ssa for function FN.
References gcc_assert, function::gimple_df, NULL, gimple_df::ssa_renaming_needed, and update_ssa_initialized_fn.
Referenced by canonicalize_induction_variables(), compute_may_aliases(), dump_update_ssa(), execute_function_todo(), execute_todo(), gimple_duplicate_sese_tail(), loop_invariant_motion_in_fun(), update_ssa(), vect_do_peeling(), vect_transform_loops(), verify_loop_closed_ssa(), and verify_ssa().
|
static |
Do a dominator walk starting at BB processing statements that reference symbols in SSA operands. This is very similar to mark_def_sites, but the scan handles statements whose operands may already be SSA names. If INSERT_PHI_P is true, mark those uses as live in the corresponding block. This is later used by the PHI placement algorithm to make PHI pruning decisions. FIXME. Most of this would be unnecessary if we could associate a symbol to all the SSA names that reference it. But that sounds like it would be expensive to maintain. Still, it would be interesting to see if it makes better sense to do that.
References CDI_DOMINATORS, cfun, first_dom_son(), free(), n_basic_blocks_for_fn, next_dom_son(), prepare_block_for_update_1(), and worklist.
Referenced by update_ssa().
|
static |
Processing statements in BB that reference symbols in SSA operands. This is very similar to mark_def_sites, but the scan handles statements whose operands may already be SSA names. If INSERT_PHI_P is true, mark those uses as live in the corresponding block. This is later used by the PHI placement algorithm to make PHI pruning decisions. FIXME. Most of this would be unnecessary if we could associate a symbol to all the SSA names that reference it. But that sounds like it would be expensive to maintain. Still, it would be interesting to see if it makes better sense to do that.
References cfun, DECL_P, DEF_FROM_PTR, FOR_EACH_EDGE, FOR_EACH_SSA_DEF_OPERAND, FOR_EACH_SSA_USE_OPERAND, gimple_phi_result(), gimple_vdef(), gimple_vuse(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, mark_block_for_update(), mark_def_interesting(), mark_for_renaming(), mark_use_interesting(), basic_block_def::preds, si, SSA_NAME_VAR, SSA_OP_DEF, SSA_OP_USE, TREE_CODE, USE_FROM_PTR, and virtual_operand_p().
Referenced by prepare_block_for_update().
Helper for prepare_names_to_update. Mark the definition site for NAME as interesting. BLOCKS and INSERT_PHI_P are as in prepare_names_to_update.
References bitmap_bit_p, cfun, gcc_checking_assert, gimple_bb(), basic_block_def::index, last_basic_block_for_fn, mark_block_for_update(), mark_def_interesting(), names_to_release, NULL, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, and virtual_operand_p().
Referenced by prepare_names_to_update().
|
static |
Mark definition and use sites of names in NEW_SSA_NAMES and OLD_SSA_NAMES. INSERT_PHI_P is true if the caller wants to insert PHI nodes for newly created names.
References bitmap_bit_p, bitmap_clear_bit(), EXECUTE_IF_SET_IN_BITMAP, i, names_to_release, new_ssa_names, NULL, old_ssa_names, prepare_def_site_for(), prepare_use_sites_for(), and ssa_name.
Referenced by update_ssa().
Helper for prepare_names_to_update. Mark all the use sites for NAME as interesting. BLOCKS and INSERT_PHI_P are as in prepare_names_to_update.
References as_a(), cfun, FOR_EACH_IMM_USE_FAST, gimple_bb(), gimple_phi_arg_edge(), mark_use_interesting(), PHI_ARG_INDEX_FROM_USE, USE_STMT, and virtual_operand_p().
Referenced by prepare_names_to_update().
Clean bits from PHIS for phi nodes whose value cannot be used in USES. KILLS is a bitmap of blocks where the value is defined before any use.
References b, BASIC_BLOCK_FOR_FN, bb_dom_dfs_in(), bb_dom_dfs_out(), dom_dfsnum::bb_index, BITMAP_ALLOC, bitmap_and_compl(), bitmap_and_compl_into(), bitmap_bit_p, bitmap_clear(), bitmap_copy(), bitmap_count_bits(), bitmap_empty_p(), BITMAP_FREE, bitmap_ior(), bitmap_set_bit, CDI_DOMINATORS, cfun, cmp_dfsnum(), defs, dom_dfsnum::dfs_num, ENTRY_BLOCK, EXECUTE_IF_SET_IN_BITMAP, find_dfsnum_interval(), FOR_EACH_EDGE, free(), gcc_assert, gcc_checking_assert, get_immediate_dominator(), i, NULL, phis, basic_block_def::preds, qsort, and worklist.
Referenced by insert_phi_nodes_for().
Return true if the DEFs created by statement STMT should be registered when marking new definition sites. This is slightly different than rewrite_uses_p: it's used by update_ssa to distinguish statements that need to have both uses and defs processed from those that only need to have their defs processed. Statements that define new SSA names only need to have their defs registered, but they don't need to have their uses renamed.
References GF_PLF_1, and gimple_plf().
Referenced by rewrite_update_dom_walker::before_dom_children(), mark_def_sites(), rewrite_stmt(), rewrite_update_stmt(), and set_register_defs().
Push SYM's current reaching definition into BLOCK_DEFS_STACK and register DEF (an SSA_NAME) to be a new definition for SYM.
References block_defs_stack, common_info::current_def, get_common_info(), is_gimple_reg(), common_info::need_phi_state, and NEED_PHI_STATE_NO.
Referenced by rewrite_dom_walker::before_dom_children(), and rewrite_stmt().
Register NEW_NAME to be the new reaching definition for all the names in OLD_NAMES. Used by the incremental SSA update routines to replace old SSA names with new ones.
References EXECUTE_IF_SET_IN_BITMAP, i, register_new_update_single(), and ssa_name.
Referenced by rewrite_update_dom_walker::before_dom_children(), and maybe_register_def().
Register NEW_NAME to be the new reaching definition for OLD_NAME.
References block_defs_stack, common_info::current_def, and get_common_info().
Referenced by rewrite_update_dom_walker::before_dom_children(), maybe_register_def(), and register_new_update_set().
void release_ssa_name_after_update_ssa | ( | tree | name | ) |
Mark NAME to be released after update_ssa has finished.
References BITMAP_ALLOC, bitmap_set_bit, cfun, gcc_assert, names_to_release, NULL, SSA_NAME_VERSION, and update_ssa_initialized_fn.
Referenced by release_ssa_name_fn().
|
static |
SSA Rewriting Step 3. Visit all the successor blocks of BB looking for PHI nodes. For every PHI node found, add a new argument containing the current reaching definition for the variable and the edge through which that definition is reaching the PHI node.
References add_phi_arg(), FOR_EACH_EDGE, get_reaching_def(), gimple_location(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), gphi_iterator::phi(), SSA_NAME_DEF_STMT, SSA_NAME_VAR, basic_block_def::succs, UNKNOWN_LOCATION, and virtual_operand_p().
Referenced by rewrite_dom_walker::before_dom_children().
|
static |
Rewrite the actual blocks, statements, and PHI arguments, to be in SSA form. ENTRY indicates the block where to start. Every block dominated by ENTRY will be rewritten. WHAT indicates what actions will be taken by the renamer (see enum rewrite_mode). REGION is a SEME region of interesting blocks for the dominator walker to process. If this set is invalid, then all the nodes dominated by ENTRY are walked. Otherwise, blocks dominated by ENTRY that are not present in BLOCKS are ignored.
References BASIC_BLOCK_FOR_FN, bitmap_clear_first_set_bit(), bitmap_empty_p(), bitmap_set_bit, block_defs_stack, blocks_to_update, CDI_DOMINATORS, cfun, dominated_by_p(), dump_dfa_stats(), dump_file, dump_flags, dump_tree_ssa_stats(), EXECUTE_IF_SET_IN_BITMAP, basic_block_def::flags, FOR_EACH_EDGE, gcc_unreachable, basic_block_def::preds, REWRITE_ALL, REWRITE_UPDATE, REWRITE_UPDATE_REGION, TDF_STATS, var_infos, dom_walker::walk(), and worklist.
Referenced by update_ssa().
|
static |
Helper function for rewrite_stmt. Rewrite uses in a debug stmt.
References bitmap_bit_p, build_debug_expr_decl(), CDI_DOMINATORS, cfun, common_info::current_def, DECL_MODE, DECL_P, dominated_by_p(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_SSA_USE_OPERAND, gcc_checking_assert, get_common_info(), get_def_blocks_for(), gimple_bb(), gimple_build_debug_source_bind(), gimple_debug_bind_reset_value(), gimple_debug_source_bind_get_value(), gimple_debug_source_bind_get_var(), gimple_debug_source_bind_p(), gsi_after_labels(), gsi_end_p(), gsi_insert_before(), gsi_next(), GSI_SAME_STMT, gsi_stmt(), basic_block_def::index, def_blocks::livein_blocks, common_info::need_phi_state, NEED_PHI_STATE_NO, NULL, NULL_TREE, SET_DECL_MODE, SET_USE, single_succ(), single_succ_p(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_OP_USE, TREE_CODE, TREE_TYPE, update_stmt(), and USE_FROM_PTR.
Referenced by rewrite_stmt().
|
static |
SSA Rewriting Step 2. Rewrite every variable used in each statement in the block with its immediate reaching definitions. Update the current definition of a variable when a new real or virtual definition is found.
References blocks_to_update, cfun, DECL_P, DEF_FROM_PTR, dump_file, dump_flags, FOR_EACH_SSA_DEF_OPERAND, FOR_EACH_SSA_USE_OPERAND, gcc_assert, gcc_checking_assert, get_or_create_ssa_default_def(), get_reaching_def(), gimple_build_debug_bind(), gimple_build_nop(), gimple_clobber_p(), gimple_vdef(), gsi_insert_after(), gsi_replace(), GSI_SAME_STMT, gsi_stmt(), is_gimple_debug(), is_gimple_reg(), make_ssa_name(), NULL, print_gimple_stmt(), register_defs_p(), register_new_def(), rewrite_debug_stmt_uses(), rewrite_uses_p(), SET_DEF, SET_USE, si, SSA_OP_ALL_DEFS, SSA_OP_ALL_USES, stmt_ends_bb_p(), target_for_debug_bind(), TDF_DETAILS, TDF_SLIM, TREE_CODE, USE_FROM_PTR, and VAR_P.
Referenced by rewrite_dom_walker::before_dom_children().
|
static |
Visit all the successor blocks of BB looking for PHI nodes. For every PHI node found, check if any of its arguments is in OLD_SSA_NAMES. If so, and if the argument has a current reaching definition, replace it.
References bitmap_bit_p, blocks_with_phis_to_rewrite, DECL_P, dyn_cast(), FOR_EACH_EDGE, get_reaching_def(), gimple_location(), gimple_phi_arg_has_location(), gimple_phi_arg_location(), gimple_phi_arg_set_location(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), is_old_name(), marked_for_renaming(), NULL, NULL_TREE, PHI_ARG_DEF_PTR_FROM_EDGE, PHI_ARG_INDEX_FROM_USE, rewrite_uses_p(), SET_USE, SSA_NAME_DEF_STMT, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, SSA_NAME_VAR, basic_block_def::succs, TREE_CODE, UNKNOWN_LOCATION, USE_FROM_PTR, and virtual_operand_p().
Referenced by rewrite_update_dom_walker::before_dom_children().
|
static |
Update every variable used in the statement pointed-to by SI. The statement is assumed to be in SSA form already. Names in OLD_SSA_NAMES used by SI will be updated to their current reaching definition. Names in OLD_SSA_NAMES or NEW_SSA_NAMES defined by SI will be registered as a new definition for their corresponding name in OLD_SSA_NAMES. Returns whether STMT should be removed.
References dump_file, dump_flags, FOR_EACH_SSA_DEF_OPERAND, FOR_EACH_SSA_USE_OPERAND, gimple_debug_bind_reset_value(), is_gimple_debug(), maybe_register_def(), maybe_replace_use(), maybe_replace_use_in_debug_stmt(), print_gimple_stmt(), register_defs_p(), rewrite_uses_p(), SSA_OP_ALL_DEFS, SSA_OP_ALL_USES, SSA_OP_USE, TDF_DETAILS, TDF_SLIM, and update_stmt().
Referenced by rewrite_update_dom_walker::before_dom_children().
Return true if STMT needs to be rewritten. When renaming a subset of the variables, not all statements will be processed. This is decided in mark_def_sites.
References gimple_visited_p().
Referenced by mark_def_sites(), mark_phi_for_rewrite(), rewrite_stmt(), rewrite_update_phi_arguments(), and rewrite_update_stmt().
Sets current definition of VAR to DEF.
References common_info::current_def, and get_common_info().
|
static |
Mark block BB as the definition site for variable VAR. PHI_P is true if VAR is defined by a PHI node.
References bitmap_set_bit, def_blocks::def_blocks, get_common_info(), get_def_blocks_for(), basic_block_def::index, ssa_name_info::info, common_info::need_phi_state, NEED_PHI_STATE_MAYBE, NEED_PHI_STATE_NO, NEED_PHI_STATE_UNKNOWN, and def_blocks::phi_blocks.
Referenced by insert_phi_nodes(), mark_def_interesting(), and mark_def_sites().
|
static |
Mark block BB as having VAR live at the entry to BB.
References BASIC_BLOCK_FOR_FN, bitmap_first_set_bit(), bitmap_set_bit, CDI_DOMINATORS, cfun, def_blocks::def_blocks, dominated_by_p(), get_common_info(), get_def_blocks_for(), basic_block_def::index, ssa_name_info::info, def_blocks::livein_blocks, common_info::need_phi_state, NEED_PHI_STATE_MAYBE, and NEED_PHI_STATE_NO.
Referenced by insert_phi_nodes(), mark_def_sites(), and mark_use_interesting().
If REGISTER_DEFS_P is true, mark STMT to have its DEFs registered.
References GF_PLF_1, gimple_set_plf(), and register_defs_p().
Referenced by initialize_flags_in_bb(), insert_phi_nodes(), insert_phi_nodes_for(), mark_def_interesting(), and mark_def_sites().
Set the rewrite marker on STMT to the value given by REWRITE_P.
References gimple_set_visited().
Referenced by initialize_flags_in_bb(), insert_phi_nodes(), mark_def_sites(), mark_phi_for_rewrite(), and mark_use_interesting().
void update_ssa | ( | unsigned | update_flags | ) |
Given a set of newly created SSA names (NEW_SSA_NAMES) and a set of existing SSA names (OLD_SSA_NAMES), update the SSA form so that: 1- The names in OLD_SSA_NAMES dominated by the definitions of NEW_SSA_NAMES are all re-written to be reached by the appropriate definition from NEW_SSA_NAMES. 2- If needed, new PHI nodes are added to the iterated dominance frontier of the blocks where each of NEW_SSA_NAMES are defined. The mapping between OLD_SSA_NAMES and NEW_SSA_NAMES is setup by calling create_new_def_for to create new defs for names that the caller wants to replace. The caller cretaes the new names to be inserted and the names that need to be replaced by calling create_new_def_for for each old definition to be replaced. Note that the function assumes that the new defining statement has already been inserted in the IL. For instance, given the following code: 1 L0: 2 x_1 = PHI (0, x_5) 3 if (x_1 < 10) 4 if (x_1 > 7) 5 y_2 = 0 6 else 7 y_3 = x_1 + x_7 8 endif 9 x_5 = x_1 + 1 10 goto L0; 11 endif Suppose that we insert new names x_10 and x_11 (lines 4 and 8). 1 L0: 2 x_1 = PHI (0, x_5) 3 if (x_1 < 10) 4 x_10 = ... 5 if (x_1 > 7) 6 y_2 = 0 7 else 8 x_11 = ... 9 y_3 = x_1 + x_7 10 endif 11 x_5 = x_1 + 1 12 goto L0; 13 endif We want to replace all the uses of x_1 with the new definitions of x_10 and x_11. Note that the only uses that should be replaced are those at lines 5, 9 and 11. Also, the use of x_7 at line 9 should *not* be replaced (this is why we cannot just mark symbol 'x' for renaming). Additionally, we may need to insert a PHI node at line 11 because that is a merge point for x_10 and x_11. So the use of x_1 at line 11 will be replaced with the new PHI node. The insertion of PHI nodes is optional. They are not strictly necessary to preserve the SSA form, and depending on what the caller inserted, they may not even be useful for the optimizers. UPDATE_FLAGS controls various aspects of how update_ssa operates, see the documentation for TODO_update_ssa*.
References BITMAP_ALLOC, bitmap_clear(), bitmap_default_obstack, bitmap_empty_p(), bitmap_initialize(), bitmap_list_view(), bitmap_tree_view(), blocks_to_update, blocks_with_phis_to_rewrite, calculate_dominance_info(), CDI_DOMINATORS, cfun, compute_dominance_frontiers(), common_info::current_def, debug_gimple_stmt(), delete_update_ssa(), dom_info_state(), DOM_NONE, dump_file, dump_flags, dump_update_ssa(), ENTRY_BLOCK_PTR_FOR_FN, error(), EXECUTE_IF_SET_IN_BITMAP, FOR_EACH_BB_FN, FOR_EACH_SSA_NAME, FOR_EACH_SSA_USE_OPERAND, FOR_EACH_VEC_ELT, free(), gcc_assert, get_ssa_name_ann(), get_var_info(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), i, basic_block_def::index, ssa_name_info::info, var_info::info, init_update_ssa(), insert_updated_phi_nodes_compare_uids(), insert_updated_phi_nodes_for(), internal_error(), iterating_old_ssa_names, last_basic_block_for_fn, marked_for_renaming(), nearest_common_dominator_for_set(), need_ssa_update_p(), new_ssa_names, NULL, NULL_TREE, old_ssa_names, PERCENT, prepare_block_for_update(), prepare_names_to_update(), print_generic_expr(), rewrite_blocks(), REWRITE_UPDATE, REWRITE_UPDATE_REGION, ssa_name, SSA_NAME_IN_FREE_LIST, SSA_NAME_VAR, SSA_OP_ALL_USES, statistics_counter_event(), symbols_to_rename, TDF_DETAILS, TDF_SLIM, timevar_pop(), timevar_push(), TODO_update_ssa, TODO_update_ssa_full_phi, TODO_update_ssa_no_phi, TODO_update_ssa_only_virtuals, TREE_CODE, update_ssa_initialized_fn, USE_FROM_PTR, var_infos, and virtual_operand_p().
Referenced by autofdo::afdo_annotate_cfg(), autofdo::afdo_vpt_for_early_inline(), cleanup_tree_cfg_noloop(), compute_fn_summary(), autofdo::early_inline(), execute_function_todo(), execute_update_addresses_taken(), cgraph_node::expand(), expand_ifn_va_arg_1(), expand_omp_taskreg(), expand_thunk(), gen_parallel_loop(), cgraph_node::get_body(), ipa_tm_transform_clone(), ipa_tm_transform_transaction(), rewrite_into_loop_closed_ssa_1(), simd_clone_adjust(), tree_function_versioning(), tree_profiling(), tree_transform_and_unroll_loop(), tree_unroll_loops_completely(), tree_unswitch_single_loop(), vect_loop_versioning(), version_loop_by_alias_check(), and version_loop_for_if_conversion().
Stack of trees used to restore the global currdefs to its original state after completing rewriting of a block and its dominator children. Its elements have the following properties: - An SSA_NAME (N) indicates that the current definition of the underlying variable should be set to the given SSA_NAME. If the symbol associated with the SSA_NAME is not a GIMPLE register, the next slot in the stack must be a _DECL node (SYM). In this case, the name N in the previous slot is the current reaching definition for SYM. - A _DECL node indicates that the underlying variable has no current definition. - A NULL node at the top entry is used to mark the last slot associated with the current block.
Referenced by rewrite_dom_walker::after_dom_children(), rewrite_update_dom_walker::after_dom_children(), rewrite_dom_walker::before_dom_children(), rewrite_update_dom_walker::before_dom_children(), dump_defs_stack(), register_new_def(), register_new_update_single(), and rewrite_blocks().
|
static |
The set of blocks affected by update_ssa.
Referenced by rewrite_update_dom_walker::before_dom_children(), delete_update_ssa(), mark_block_for_update(), mark_def_interesting(), mark_def_sites(), rewrite_blocks(), rewrite_stmt(), and update_ssa().
|
static |
The bitmap of blocks with PHIs to rewrite.
Referenced by delete_update_ssa(), mark_phi_for_rewrite(), rewrite_update_phi_arguments(), and update_ssa().
|
static |
Referenced by clear_ssa_name_info(), and get_ssa_name_ann().
|
static |
Referenced by get_ssa_name_ann().
|
static |
Referenced by rewrite_dom_walker::before_dom_children(), insert_phi_nodes(), and mark_def_sites().
|
static |
Debugging aid to fence old_ssa_names changes when iterating over it.
Referenced by add_new_name_mapping(), and update_ssa().
bitmap names_to_release |
Set of SSA names that have been marked to be released after they were registered in the replacement table. They will be finally released after we finish updating the SSA web.
Referenced by delete_update_ssa(), dump_update_ssa(), init_update_ssa(), prepare_def_site_for(), prepare_names_to_update(), release_ssa_name_after_update_ssa(), and verify_ssaname_freelists().
|
static |
Set of new SSA names being added by update_ssa. Note that both NEW_SSA_NAMES and OLD_SSA_NAMES are dense bitmaps because most of the operations done on them are presence tests.
Referenced by add_new_name_mapping(), delete_update_ssa(), dump_update_ssa(), init_update_ssa(), is_new_name(), prepare_names_to_update(), and update_ssa().
|
static |
Set of existing SSA names being replaced by update_ssa.
Referenced by add_new_name_mapping(), delete_update_ssa(), init_update_ssa(), is_old_name(), prepare_names_to_update(), and update_ssa().
Referenced by delete_update_ssa(), dump_currdefs(), mark_for_renaming(), and update_ssa().
|
static |
The set of symbols we ought to re-write into SSA form in update_ssa.
Referenced by delete_update_ssa(), dump_update_ssa(), mark_for_renaming(), and marked_for_renaming().
The function the SSA updating data structures have been initialized for. NULL if they need to be initialized by create_new_def_for.
Referenced by create_new_def_for(), delete_update_ssa(), init_update_ssa(), name_registered_for_update_p(), need_ssa_update_p(), release_ssa_name_after_update_ssa(), and update_ssa().
|
static |
Referenced by add_to_repl_tbl(), fini_ssa_renamer(), get_def_blocks_for(), init_ssa_renamer(), and init_update_ssa().
|
static |
Each entry in VAR_INFOS contains an element of type STRUCT VAR_INFO_D.
Referenced by dump_tree_ssa_stats(), dump_var_infos(), fini_ssa_renamer(), get_var_info(), init_ssa_renamer(), insert_phi_nodes(), rewrite_blocks(), and update_ssa().