GCC Middle and Back End API Reference
|
Data Structures | |
struct | st_expr |
struct | st_expr_hasher |
Variables | |
static struct st_expr * | store_motion_mems = NULL |
static sbitmap * | st_kill |
static sbitmap * | st_avloc |
static sbitmap * | st_antloc |
static sbitmap * | st_transp |
static sbitmap * | st_insert_map |
static sbitmap * | st_delete_map |
static int | num_stores |
static struct edge_list * | edge_list |
static hash_table< st_expr_hasher > | store_motion_mems_table |
|
static |
Fill in available, anticipatable, transparent and kill vectors in STORE_DATA, based on lists of available and anticipatable stores.
References st_expr::antic_stores, st_expr::avail_stores, bitmap_bit_p(), bitmap_set_bit(), bitmap_vector_clear(), dump_bitmap_vector(), dump_file, first_st_expr(), free(), gen_reg_rtx_and_attrs(), st_expr::index, basic_block_def::index, max_reg_num(), memset(), next_st_expr(), num_stores, st_expr::pattern, st_expr::pattern_regs, replace_store_insn(), sbitmap_vector_alloc(), and store_killed_after().
Referenced by one_store_motion_pass().
|
static |
Find available and anticipatable stores.
References st_expr::antic_stores, st_expr::avail_stores, hash_table< Descriptor, Allocator >::create(), dump_file, enumerate_store_motion_mems(), find_moveable_store(), first_st_expr(), free(), free_st_expr_entry(), st_expr::hash_index, max_reg_num(), memset(), st_expr::next, next_st_expr(), print_store_motion_mems(), and hash_table< Descriptor, Allocator >::remove_elt_with_hash().
Referenced by one_store_motion_pass().
|
static |
Delete a store, but copy the value that would have been stored into the reaching_reg for later storing.
References st_expr::avail_stores, gen_reg_rtx_and_attrs(), st_expr::pattern, st_expr::reaching_reg, and replace_store_insn().
Referenced by one_store_motion_pass().
|
static |
Assign each element of the list of mems a monotonically increasing value.
References st_expr::index, and st_expr::next.
Referenced by compute_store_table().
|
static |
|
static |
Returns a list of registers mentioned in X. FIXME: A regset would be prettier and less expensive.
References extract_mentioned_regs_1(), and for_each_rtx().
Referenced by find_moveable_store().
|
static |
Helper for extract_mentioned_regs.
References alloc_EXPR_LIST().
Referenced by extract_mentioned_regs().
|
static |
Go through the entire rtx X, looking for any loads which might alias STORE_PATTERN. Return true if found. AFTER is true if we are checking the case when STORE_PATTERN occurs after the insn X.
References load_kills_store(), and SET.
Referenced by store_killed_in_insn(), and store_killed_in_pat().
|
static |
Determine whether INSN is MEM store pattern that we will consider moving. REGS_SET_BEFORE is bitmap of registers set before (and including) the current insn, REGS_SET_AFTER is bitmap of registers set after (and including) the insn in this basic block. We must be passing through BB from head to end, as we are using this fact to speed things up. The results are stored this way: -- the first anticipatable expression is added into ANTIC_STORES -- if the processed expression is not anticipatable, NULL_RTX is added there instead, so that we can use it as indicator that no further expression of this type may be anticipatable -- if the expression is available, it is added as head of AVAIL_STORES; consequently, all of them but this head are dead and may be deleted. -- if the expression is not available, the insn due to that it fails to be available is stored in REACHING_REG (via LAST_AVAIL_CHECK_FAILURE). The things are complicated a bit by fact that there already may be stores to the same MEM from other blocks; also caller must take care of the necessary cleanup of the temporary markers after end of the basic block.
References alloc_INSN_LIST(), st_expr::antic_stores, st_expr::avail_stores, can_assign_to_reg_without_clobbers_p(), function::can_throw_non_call_exceptions, cfun, extract_mentioned_regs(), find_reg_note(), may_trap_p(), st_expr::pattern_regs, side_effects_p(), st_expr_entry(), store_killed_after(), and store_killed_before().
Referenced by compute_store_table().
|
staticread |
Return first item in the list.
References store_motion_mems.
Referenced by build_store_vectors(), compute_store_table(), one_store_motion_pass(), and print_store_motion_mems().
|
static |
Free up an individual st_expr entry.
References st_expr::antic_stores, st_expr::avail_stores, free(), and free_INSN_LIST_list().
Referenced by compute_store_table(), and free_store_motion_mems().
|
static |
Free memory used by store motion.
References free_store_motion_mems(), and sbitmap_vector_free().
Referenced by one_store_motion_pass().
|
static |
Free up all memory associated with the st_expr list.
References hash_table< Descriptor, Allocator >::dispose(), free_st_expr_entry(), hash_table< Descriptor, Allocator >::is_created(), st_expr::next, and store_motion_mems.
Referenced by free_store_memory().
|
static |
References function::calls_setjmp, cfun, dbg_cnt(), optimize_function_for_speed_p(), and store_motion().
|
static |
In all code following after this, REACHING_REG has its original meaning again. Avoid confusion, and undef the accessor macro for the temporary marks usage in compute_store_table.
Insert an instruction at the beginning of a basic block, and update the BB_HEAD if needed.
References dump_file, emit_insn_after_noloc(), basic_block_def::index, and print_inline_rtx().
Referenced by insert_store().
|
static |
This routine will insert a store on an edge. EXPR is the st_expr entry for the memory reference, and E is the edge to insert it on. Returns nonzero if an edge insertion was performed.
References bitmap_bit_p(), bitmap_clear_bit(), copy_rtx(), edge_def::dest, dump_file, edge_def::flags, gen_move_insn(), st_expr::index, basic_block_def::index, insert_insn_on_edge(), insert_insn_start_basic_block(), st_expr::pattern, basic_block_def::preds, print_inline_rtx(), st_expr::reaching_reg, and edge_def::src.
Referenced by one_store_motion_pass().
|
static |
Check to see if the load X is aliased with STORE_PATTERN. AFTER is true if we are checking the case when STORE_PATTERN occurs after the X.
References anti_dependence(), and true_dependence().
Referenced by find_loads().
rtl_opt_pass* make_pass_rtl_store_motion | ( | ) |
|
staticread |
Return the next item in the list after the specified one.
References st_expr::next.
Referenced by build_store_vectors(), compute_store_table(), one_store_motion_pass(), and print_store_motion_mems().
|
static |
Perform store motion. Much like gcse, except we move expressions the other way by looking at the flowgraph in reverse. Return non-zero if transformations are performed by the pass.
References add_noreturn_fake_exit_edges(), bitmap_bit_p(), build_store_vectors(), commit_edge_insertions(), compute_store_table(), connect_infinite_loops_to_exit(), current_function_name(), delete_store(), hash_table< Descriptor, Allocator >::dispose(), dump_file, end_alias_analysis(), first_st_expr(), free_edge_list(), free_store_memory(), st_expr::index, basic_block_def::index, init_alias_analysis(), insert_store(), next_st_expr(), num_stores, pre_edge_rev_lcm(), and remove_fake_exit_edges().
Referenced by execute_rtl_store_motion().
|
static |
Dump debugging info about the store_motion_mems list.
References st_expr::antic_stores, st_expr::avail_stores, dump_file, first_st_expr(), st_expr::index, next_st_expr(), st_expr::pattern, and print_rtl().
Referenced by compute_store_table().
|
static |
Remove any REG_EQUAL or REG_EQUIV notes containing a reference to the memory location in SMEXPR set in basic block BB. This could be rather expensive.
References st_expr::antic_stores, bitmap_bit_p(), bitmap_clear(), bitmap_set_bit(), edge_def::dest, dump_file, ei_container(), ei_edge(), ei_end_p(), ei_next(), exp_equiv_p(), find_reg_equal_equiv_note(), free(), st_expr::index, basic_block_def::index, last, st_expr::pattern, remove_note(), sbitmap_alloc(), sbitmap_free(), stack, basic_block_def::succs, and visited.
Referenced by replace_store_insn().
|
static |
This routine will replace a store with a SET to a specified register.
References st_expr::antic_stores, delete_insn(), dump_file, emit_insn_after(), exp_equiv_p(), find_reg_equal_equiv_note(), gen_move_insn(), basic_block_def::index, st_expr::pattern, print_inline_rtx(), remove_note(), and remove_reachable_equiv_notes().
Referenced by build_store_vectors(), and delete_store().
|
staticread |
This will search the st_expr list for a matching expression. If it doesn't find one, we create one and initialize it.
References st_expr::antic_stores, st_expr::avail_stores, hash_table< Descriptor, Allocator >::find_slot_with_hash(), st_expr::hash_index, hash_rtx(), st_expr::index, st_expr::next, st_expr::pattern, st_expr::pattern_regs, st_expr::reaching_reg, and store_motion_mems.
Referenced by find_moveable_store().
|
static |
Returns true if the expression X is loaded or clobbered on or after INSN within basic block BB. REGS_SET_AFTER is bitmap of registers set in or after the insn. X_REGS is list of registers mentioned in X. If the store is killed, return the last insn in that it occurs in FAIL_INSN.
References last, store_killed_in_insn(), and store_ops_ok().
Referenced by build_store_vectors(), and find_moveable_store().
|
static |
Returns true if the expression X is loaded or clobbered on or before INSN within basic block BB. X_REGS is list of registers mentioned in X. REGS_SET_BEFORE is bitmap of registers set before or in this insn.
References first, store_killed_in_insn(), and store_ops_ok().
Referenced by find_moveable_store().
|
static |
Check if INSN kills the store pattern X (is aliased with it). AFTER is true if we are checking the case when store X occurs after the insn. Return true if it does.
References exp_equiv_p(), find_loads(), find_reg_equal_equiv_note(), may_be_sp_based_p(), SET, and store_killed_in_pat().
Referenced by store_killed_after(), and store_killed_before().
|
inlinestatic |
Go through pattern PAT looking for any loads which might kill the store in X. Return true if found. AFTER is true if we are checking the case when loads kill X occurs after the insn for PAT.
References exp_equiv_p(), find_loads(), output_dependence(), and SET.
Referenced by store_killed_in_insn().
|
static |
Return zero if some of the registers in list X are killed due to set of registers in bitmap REGS_SET.
Referenced by store_killed_after(), and store_killed_before().
Contains the edge_list returned by pre_edge_lcm.
Referenced by compute_pre_data(), one_pre_gcse_pass(), optimize_mode_switching(), pre_edge_lcm(), and pre_edge_rev_lcm().
|
static |
Global holding the number of store expressions we are dealing with.
Referenced by build_store_vectors(), infer_value_range(), and one_store_motion_pass().
|
static |
|
static |
|
static |
Nonzero for expressions which should be deleted in a specific block.
|
static |
Nonzero for expressions which should be inserted on a specific edge.
|
static |
These bitmaps will hold the local dataflow properties per basic block.
|
static |
|
static |
Head of the list of load/store memory refs.
Referenced by first_st_expr(), free_store_motion_mems(), and st_expr_entry().
|
static |
Hashtable for the load/store memory refs.