GCC Middle and Back End API Reference
df-problems.c File Reference

Data Structures

struct  df_rd_problem_data
struct  df_lr_problem_data
struct  df_live_problem_data
struct  df_word_lr_problem_data
struct  df_md_problem_data

Functions

void df_chain_dump ()
void df_print_bb_index ()
static void df_rd_free_bb_info (basic_block bb, void *vbb_info)
static void df_rd_alloc ()
void df_rd_simulate_artificial_defs_at_top ()
void df_rd_simulate_one_insn (basic_block bb, rtx insn, bitmap local_rd)
static void df_rd_bb_local_compute_process_def (struct df_rd_bb_info *bb_info, df_ref *def_rec, int top_flag)
static void df_rd_bb_local_compute ()
static void df_rd_local_compute ()
static void df_rd_init_solution ()
static bool df_rd_confluence_n ()
static bool df_rd_transfer_function ()
static void df_rd_free ()
static void df_rd_start_dump ()
static void df_rd_dump_defs_set ()
static void df_rd_top_dump ()
static void df_rd_bottom_dump ()
void df_rd_add_problem ()
static void df_lr_free_bb_info (basic_block bb, void *vbb_info)
static void df_lr_alloc ()
static void df_lr_reset ()
static void df_lr_bb_local_compute ()
static void df_lr_local_compute ()
static void df_lr_init ()
static void df_lr_confluence_0 ()
static bool df_lr_confluence_n ()
static bool df_lr_transfer_function ()
static void df_lr_finalize ()
static void df_lr_free ()
static void df_lr_top_dump ()
static void df_lr_bottom_dump ()
static void df_lr_verify_solution_start ()
static void df_lr_verify_solution_end ()
void df_lr_add_problem ()
void df_lr_verify_transfer_functions ()
static void df_live_free_bb_info (basic_block bb, void *vbb_info)
static void df_live_alloc ()
static void df_live_reset ()
static void df_live_bb_local_compute ()
static void df_live_local_compute ()
static void df_live_init ()
static bool df_live_confluence_n ()
static bool df_live_transfer_function ()
static void df_live_finalize ()
static void df_live_free ()
static void df_live_top_dump ()
static void df_live_bottom_dump ()
static void df_live_verify_solution_start ()
static void df_live_verify_solution_end ()
void df_live_add_problem ()
void df_live_set_all_dirty ()
void df_live_verify_transfer_functions ()
struct df_linkdf_chain_create ()
static void df_chain_unlink_1 ()
void df_chain_unlink ()
void df_chain_copy (df_ref to_ref, struct df_link *from_ref)
static void df_chain_remove_problem ()
static void df_chain_fully_remove_problem ()
static void df_chain_alloc ()
static void df_chain_reset ()
static void df_chain_create_bb_process_use (bitmap local_rd, df_ref *use_rec, int top_flag)
static void df_chain_create_bb ()
static void df_chain_finalize ()
static void df_chain_free ()
static void df_chain_bb_dump ()
static void df_chain_top_dump ()
static void df_chain_bottom_dump ()
static void df_chain_insn_top_dump ()
static void df_chain_insn_bottom_dump ()
void df_chain_add_problem ()
static void df_word_lr_free_bb_info (basic_block bb, void *vbb_info)
static void df_word_lr_alloc ()
static void df_word_lr_reset ()
bool df_word_lr_mark_ref ()
static void df_word_lr_bb_local_compute ()
static void df_word_lr_local_compute ()
static void df_word_lr_init ()
static bool df_word_lr_confluence_n ()
static bool df_word_lr_transfer_function ()
static void df_word_lr_free ()
static void df_word_lr_top_dump ()
static void df_word_lr_bottom_dump ()
void df_word_lr_add_problem ()
bool df_word_lr_simulate_defs ()
void df_word_lr_simulate_uses ()
static void df_note_alloc ()
static void df_print_note ()
static bool df_ignore_stack_reg ()
static void df_remove_dead_and_unused_notes ()
static void df_remove_dead_eq_notes ()
static void df_set_note ()
static bool df_whole_mw_reg_unused_p (struct df_mw_hardreg *mws, bitmap live, bitmap artificial_uses)
static void df_set_unused_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, bitmap live, bitmap do_not_gen, bitmap artificial_uses, struct dead_debug_local *debug)
static bool df_whole_mw_reg_dead_p (struct df_mw_hardreg *mws, bitmap live, bitmap artificial_uses, bitmap do_not_gen)
static void df_set_dead_notes_for_mw (rtx insn, struct df_mw_hardreg *mws, bitmap live, bitmap do_not_gen, bitmap artificial_uses, bool *added_notes_p)
static void df_create_unused_note (rtx insn, df_ref def, bitmap live, bitmap artificial_uses, struct dead_debug_local *debug)
static void df_note_bb_compute (unsigned int bb_index, bitmap live, bitmap do_not_gen, bitmap artificial_uses)
static void df_note_compute ()
static void df_note_free ()
void df_note_add_problem ()
void df_simulate_find_defs ()
static void df_simulate_find_uses ()
void df_simulate_find_noclobber_defs ()
void df_simulate_defs ()
void df_simulate_uses ()
static void df_simulate_fixup_sets ()
void df_simulate_initialize_backwards ()
void df_simulate_one_insn_backwards ()
void df_simulate_finalize_backwards ()
void df_simulate_initialize_forwards ()
void df_simulate_one_insn_forwards ()
static int find_memory ()
static void find_memory_stores (rtx x, const_rtx pat, void *data)
void simulate_backwards_to_point ()
bool can_move_insns_across (rtx from, rtx to, rtx across_from, rtx across_to, basic_block merge_bb, regset merge_live, regset other_branch_live, rtx *pmove_upto)
static void df_md_free_bb_info (basic_block bb, void *vbb_info)
static void df_md_alloc ()
void df_md_simulate_artificial_defs_at_top ()
void df_md_simulate_one_insn (basic_block bb, rtx insn, bitmap local_md)
static void df_md_bb_local_compute_process_def (struct df_md_bb_info *bb_info, df_ref *def_rec, int top_flag)
static void df_md_bb_local_compute ()
static void df_md_local_compute ()
static void df_md_reset ()
static bool df_md_transfer_function ()
static void df_md_init ()
static void df_md_confluence_0 ()
static bool df_md_confluence_n ()
static void df_md_free ()
static void df_md_top_dump ()
static void df_md_bottom_dump ()
void df_md_add_problem ()

Variables

static bitmap_head seen_in_block
static bitmap_head seen_in_insn
static struct df_problem problem_RD
static struct df_problem problem_LR
static bitmap_head df_live_scratch
static struct df_problem problem_LIVE
static struct df_problem problem_CHAIN
static struct df_problem problem_WORD_LR
static struct df_problem problem_NOTE
static bitmap_head df_md_scratch
static struct df_problem problem_MD

Function Documentation

bool can_move_insns_across ( rtx  from,
rtx  to,
rtx  across_from,
rtx  across_to,
basic_block  merge_bb,
regset  merge_live,
regset  other_branch_live,
rtx pmove_upto 
)
Return true if it is safe to move a group of insns, described by
   the range FROM to TO, backwards across another group of insns,
   described by ACROSS_FROM to ACROSS_TO.  It is assumed that there
   are no insns between ACROSS_TO and FROM, but they may be in
   different basic blocks; MERGE_BB is the block from which the
   insns will be moved.  The caller must pass in a regset MERGE_LIVE
   which specifies the registers live after TO.

   This function may be called in one of two cases: either we try to
   move identical instructions from all successor blocks into their
   predecessor, or we try to move from only one successor block.  If
   OTHER_BRANCH_LIVE is nonnull, it indicates that we're dealing with
   the second case.  It should contain a set of registers live at the
   end of ACROSS_TO which must not be clobbered by moving the insns.
   In that case, we're also more careful about moving memory references
   and trapping insns.

   We return false if it is not safe to move the entire group, but it
   may still be possible to move a subgroup.  PMOVE_UPTO, if nonnull,
   is set to point at the last moveable insn in such a case.   

References bitmap_and_compl_into(), bitmap_and_into(), bitmap_copy(), bitmap_intersect_p(), df_simulate_defs(), df_simulate_find_defs(), df_simulate_find_uses(), df_simulate_initialize_backwards(), df_simulate_one_insn_backwards(), df_simulate_uses(), find_memory(), find_memory_stores(), for_each_rtx(), global_regs, may_trap_or_fault_p(), may_trap_p(), note_stores(), reg_obstack, reload_completed, sets_cc0_p(), targetm, and volatile_insn_p().

Referenced by dead_or_predicable(), and try_head_merge_bb().

void df_chain_add_problem ( )
Create a new DATAFLOW instance and add it to an existing instance
   of DF.  The returned structure is what is used to get at the
   solution.   

References df_add_problem(), and df_bitmap_obstack.

Referenced by find_and_remove_re(), find_defs(), init_dce(), iv_analysis_loop_init(), sched_init(), and web_main().

static void df_chain_alloc ( )
static
Create def-use or use-def chains.   

References create_alloc_pool(), and df_chain_remove_problem().

static void df_chain_bottom_dump ( )
static

References df_chain_bb_dump().

void df_chain_copy ( df_ref  to_ref,
struct df_link from_ref 
)
Copy the du or ud chain starting at FROM_REF and attach it to
   TO_REF.   

References df_chain_create(), df_link::next, and df_link::ref.

struct df_link* df_chain_create ( )
read
Create a du or ud chain from SRC to DST and link it into SRC.    

References df_link::next, pool_alloc(), and df_link::ref.

Referenced by df_chain_copy(), and df_chain_create_bb_process_use().

static void df_chain_create_bb_process_use ( bitmap  local_rd,
df_ref use_rec,
int  top_flag 
)
static
Create the chains for a list of USEs.   

References df_d::changeable_flags, count, df, df_chain_create(), DF_DU_CHAIN, DF_NO_HARD_REGS, DF_REF_AT_TOP, and DF_UD_CHAIN.

Referenced by df_chain_create_bb().

void df_chain_dump ( )
Generic versions to get the void* version of the block info.  Only
   used inside the problem instance vectors.   
Dump a def-use or use-def chain for REF to FILE.   

References DF_REF_IN_NOTE, df_link::next, and df_link::ref.

Referenced by debug_df_chain(), df_chain_bb_dump(), df_chain_insn_bottom_dump(), df_chain_insn_top_dump(), df_ref_debug(), and df_refs_chain_dump().

static void df_chain_finalize ( )
static
Create def-use chains from reaching use bitmaps for basic blocks
   in BLOCKS.   

References df_chain_create_bb().

static void df_chain_free ( )
static
Free all storage associated with the problem.   

References free(), and free_alloc_pool().

static void df_chain_fully_remove_problem ( )
static
Remove the chain problem completely.   

References df_chain_remove_problem(), and free().

static void df_chain_insn_bottom_dump ( )
static
static void df_chain_insn_top_dump ( )
static
static void df_chain_remove_problem ( )
static
static void df_chain_reset ( )
static
Reset all of the chains when the set of basic blocks changes.   

References df_chain_remove_problem().

static void df_chain_top_dump ( )
static

References df_chain_bb_dump().

void df_chain_unlink ( )
Delete a du or ud chain that leave or point to REF.   

References df_chain_unlink_1(), df_link::next, pool_free(), and df_link::ref.

Referenced by df_ref_chain_delete_du_chain(), and df_reg_chain_unlink().

static void df_chain_unlink_1 ( )
static
Delete any du or ud chains that start at REF and point to
   TARGET.   

References df_link::next, pool_free(), and df_link::ref.

Referenced by df_chain_unlink().

static void df_create_unused_note ( rtx  insn,
df_ref  def,
bitmap  live,
bitmap  artificial_uses,
struct dead_debug_local debug 
)
static
Create a REG_UNUSED note if necessary for DEF in INSN updating
   LIVE.  Do not generate notes for registers in ARTIFICIAL_USES.   

References bitmap_bit_p(), dead_debug_insert_temp(), DEBUG_TEMP_AFTER_WITH_REG, df_ignore_stack_reg(), df_print_note(), df_ref_debug(), DF_REF_MW_HARDREG, df_set_note(), and dump_file.

Referenced by df_note_bb_compute().

static bool df_ignore_stack_reg ( )
inlinestatic
After reg-stack, the x86 floating point stack regs are difficult to
   analyze because of all of the pushes, pops and rotations.  Thus, we
   just leave the notes alone.  

References regstack_completed.

Referenced by df_create_unused_note(), df_note_bb_compute(), and df_remove_dead_and_unused_notes().

void df_live_add_problem ( void  )
Create a new DATAFLOW instance and add it to an existing instance
   of DF.  The returned structure is what is used to get at the
   solution.   

References df_add_problem(), and df_bitmap_obstack.

Referenced by do_reload(), if_convert(), initialize_uninitialized_regs(), reorg_loops(), and rest_of_handle_df_initialize().

static void df_live_alloc ( )
static
Allocate or reset bitmaps for DF_LIVE blocks. The solution bits are
   not touched unless the block is new.   

References bitmap_obstack_initialize(), df_live_problem_data::in, df_live_problem_data::live_bitmaps, and df_live_problem_data::out.

static void df_live_bottom_dump ( )
static
static bool df_live_confluence_n ( )
static
static void df_live_finalize ( )
static
And the LR info with the must-initialized registers, to produce the LIVE info.   

References bitmap_and_into(), df_live_get_bb_info(), df_lr_get_bb_info(), df_lr_bb_info::in, df_live_bb_info::in, df_lr_bb_info::out, and df_live_bb_info::out.

static void df_live_free ( )
static
Free all storage associated with the problem.   

References bitmap_clear(), bitmap_obstack_release(), free(), and df_live_problem_data::live_bitmaps.

static void df_live_free_bb_info ( basic_block  bb,
void *  vbb_info 
)
static
static void df_live_init ( )
static
static void df_live_local_compute ( )
static
Compute local uninitialized register info.   

References bitmap_clear(), df_grow_insn_info(), and df_live_bb_local_compute().

static void df_live_reset ( )
static
Reset the global solution for recalculation.   

References bitmap_clear(), df_live_get_bb_info(), df_live_bb_info::in, and df_live_bb_info::out.

void df_live_set_all_dirty ( void  )
Set all of the blocks as dirty.  This needs to be done if this
   problem is added after all of the insns have been scanned.   

References bitmap_set_bit(), and basic_block_def::index.

Referenced by do_reload(), if_convert(), initialize_uninitialized_regs(), and reorg_loops().

static void df_live_top_dump ( )
static
static bool df_live_transfer_function ( )
static
static void df_live_verify_solution_end ( )
static
Compare the saved datastructure and the new solution to the dataflow
   equations.   

References bitmap_clear(), bitmap_equal_p(), free(), df_live_problem_data::in, basic_block_def::index, and df_live_problem_data::out.

static void df_live_verify_solution_start ( )
static
Build the datastructure to verify that the solution to the dataflow
   equations is not dirty.   

References bitmap_copy(), df_live_problem_data::in, basic_block_def::index, df_live_problem_data::live_bitmaps, and df_live_problem_data::out.

void df_lr_add_problem ( void  )
Create a new DATAFLOW instance and add it to an existing instance
   of DF.  The returned structure is what is used to get at the
   solution.   

References df_add_problem(), and df_bitmap_obstack.

Referenced by rest_of_handle_df_initialize().

static void df_lr_alloc ( )
static
Allocate or reset bitmaps for DF_LR blocks. The solution bits are
   not touched unless the block is new.   

References bitmap_obstack_initialize(), df_grow_bb_info(), df_lr_problem_data::in, df_lr_problem_data::lr_bitmaps, and df_lr_problem_data::out.

Referenced by df_lr_finalize().

static void df_lr_bottom_dump ( )
static
static void df_lr_confluence_0 ( )
static
Confluence function that processes infinite loops.  This might be a
   noreturn function that throws.  And even if it isn't, getting the
   unwind info right helps debugging.   

References bitmap_copy(), df, df_lr_get_bb_info(), df_d::hardware_regs_used, basic_block_def::index, and df_lr_bb_info::out.

static void df_lr_finalize ( )
static
static void df_lr_free ( )
static
Free all storage associated with the problem.   

References bitmap_obstack_release(), free(), and df_lr_problem_data::lr_bitmaps.

static void df_lr_free_bb_info ( basic_block  bb,
void *  vbb_info 
)
static
static void df_lr_init ( )
static
static void df_lr_local_compute ( )
static
static void df_lr_reset ( )
static
Reset the global solution for recalculation.   

References bitmap_clear(), df_lr_get_bb_info(), df_lr_bb_info::in, and df_lr_bb_info::out.

static void df_lr_top_dump ( )
static
static bool df_lr_transfer_function ( )
static
static void df_lr_verify_solution_end ( )
static
Compare the saved datastructure and the new solution to the dataflow
   equations.   

References bitmap_clear(), bitmap_equal_p(), free(), df_lr_problem_data::in, basic_block_def::index, and df_lr_problem_data::out.

static void df_lr_verify_solution_start ( )
static
Build the datastructure to verify that the solution to the dataflow
   equations is not dirty.   

References bitmap_copy(), df_lr_problem_data::in, basic_block_def::index, df_lr_problem_data::lr_bitmaps, and df_lr_problem_data::out.

void df_md_add_problem ( void  )
Create a new MD instance and add it to the existing instance
   of DF.   

References df_add_problem().

Referenced by build_single_def_use_links().

static void df_md_alloc ( )
static
Allocate or reset bitmaps for DF_MD. The solution bits are
   not touched unless the block is new.   

References bitmap_obstack_initialize(), df_grow_bb_info(), and df_md_problem_data::md_bitmaps.

static void df_md_bb_local_compute ( )
static
static void df_md_bb_local_compute_process_def ( struct df_md_bb_info bb_info,
df_ref def_rec,
int  top_flag 
)
static
static void df_md_bottom_dump ( )
static
Debugging info at bottom of bb.   

References df_md_get_bb_info(), df_print_regset(), basic_block_def::index, and df_md_bb_info::out.

static void df_md_confluence_0 ( )
static
static void df_md_free ( )
static
Free all storage associated with the problem.   

References bitmap_obstack_release(), free(), and df_md_problem_data::md_bitmaps.

static void df_md_free_bb_info ( basic_block  bb,
void *  vbb_info 
)
static
static void df_md_init ( )
static
Initialize the solution bit vectors for problem.   

References bitmap_copy(), df_md_get_bb_info(), df_md_transfer_function(), df_md_bb_info::in, and df_md_bb_info::init.

static void df_md_local_compute ( )
static
static void df_md_reset ( )
static
Reset the global solution for recalculation.   

References bitmap_clear(), df_md_get_bb_info(), df_md_bb_info::in, and df_md_bb_info::out.

void df_md_simulate_artificial_defs_at_top ( )
Add the effect of the top artificial defs of BB to the multiple definitions
   bitmap LOCAL_MD.   

References bitmap_clear_bit(), bitmap_set_bit(), df_get_artificial_defs(), DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_MAY_CLOBBER, DF_REF_PARTIAL, and basic_block_def::index.

void df_md_simulate_one_insn ( basic_block  bb,
rtx  insn,
bitmap  local_md 
)
Add the effect of the defs of INSN to the reaching definitions bitmap
   LOCAL_MD.   

References bitmap_clear_bit(), bitmap_set_bit(), df_d::changeable_flags, df, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_MAY_CLOBBER, and DF_REF_PARTIAL.

static void df_md_top_dump ( )
static
void df_note_add_problem ( void  )
static void df_note_alloc ( )
static
static void df_note_compute ( )
static
Compute register info: lifetime, bb, and number of defs and uses.   

References bitmap_clear(), df_bitmap_obstack, df_note_bb_compute(), and live.

static void df_note_free ( )
static
Free all storage associated with the problem.   

References free().

void df_print_bb_index ( )
Print some basic block info as part of df_dump.   

References edge_def::dest, edge_def::flags, basic_block_def::index, basic_block_def::preds, edge_def::src, and basic_block_def::succs.

Referenced by df_dump(), and dse_step4().

static void df_print_note ( )
static
void df_rd_add_problem ( void  )
Create a new RD instance and add it to the existing instance
   of DF.   

References df_add_problem().

Referenced by sched_init().

static void df_rd_bb_local_compute ( )
static
static void df_rd_bb_local_compute_process_def ( struct df_rd_bb_info bb_info,
df_ref def_rec,
int  top_flag 
)
static
Process a list of DEFs for df_rd_bb_local_compute.  This is a bit
   more complicated than just simulating, because we must produce the
   gen and kill sets and hence deal with the two possible representations
   of kill sets.    

References bitmap_bit_p(), bitmap_clear_range(), bitmap_set_bit(), bitmap_set_range(), df_d::changeable_flags, df, DF_NO_HARD_REGS, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_PARTIAL, df_rd_bb_info::gen, df_rd_bb_info::kill, and df_rd_bb_info::sparse_kill.

Referenced by df_rd_bb_local_compute().

static void df_rd_bottom_dump ( )
static
Debugging info at bottom of bb.   

References df_rd_dump_defs_set(), df_rd_get_bb_info(), basic_block_def::index, and df_rd_bb_info::out.

static void df_rd_free ( )
static
Free all storage associated with the problem.   

References bitmap_obstack_release(), free(), and df_rd_problem_data::rd_bitmaps.

static void df_rd_free_bb_info ( basic_block  bb,
void *  vbb_info 
)
static
static void df_rd_init_solution ( )
static
Initialize the solution bit vectors for problem.   

References bitmap_clear(), bitmap_copy(), df_rd_get_bb_info(), df_rd_bb_info::gen, df_rd_bb_info::in, and df_rd_bb_info::out.

void df_rd_simulate_artificial_defs_at_top ( )
Add the effect of the top artificial defs of BB to the reaching definitions
   bitmap LOCAL_RD.   

References bitmap_clear_range(), bitmap_set_bit(), df_get_artificial_defs(), DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_PARTIAL, and basic_block_def::index.

Referenced by df_chain_create_bb().

void df_rd_simulate_one_insn ( basic_block  bb,
rtx  insn,
bitmap  local_rd 
)
Add the effect of the defs of INSN to the reaching definitions bitmap
   LOCAL_RD.   

References bitmap_clear_range(), bitmap_set_bit(), df_d::changeable_flags, df, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, and DF_REF_PARTIAL.

Referenced by df_chain_create_bb().

static void df_rd_start_dump ( )
static
static void df_rd_top_dump ( )
static
static void df_remove_dead_and_unused_notes ( )
static
Remove all of the REG_DEAD or REG_UNUSED notes from INSN.   

References df_ignore_stack_reg(), df_print_note(), and free_EXPR_LIST_node().

Referenced by df_note_bb_compute().

static void df_remove_dead_eq_notes ( )
static
Remove REG_EQUAL/REG_EQUIV notes referring to dead pseudos using LIVE
   as the bitmap of currently live registers.   

References bitmap_bit_p(), deleted, df_notes_rescan(), df_print_note(), DF_REF_IN_NOTE, free_EXPR_LIST_node(), and loc_mentioned_in_p().

Referenced by df_note_bb_compute().

static void df_set_dead_notes_for_mw ( rtx  insn,
struct df_mw_hardreg mws,
bitmap  live,
bitmap  do_not_gen,
bitmap  artificial_uses,
bool *  added_notes_p 
)
static
Set the REG_DEAD notes for the multiword hardreg use in INSN based
   on the bits in LIVE.  DO_NOT_GEN is used to keep REG_DEAD notes
   from being set if the instruction both reads and writes the
   register.   

References bitmap_bit_p(), df_print_note(), df_print_regset(), df_set_note(), df_whole_mw_reg_dead_p(), dump_file, df_mw_hardreg::end_regno, df_mw_hardreg::mw_reg, regno_reg_rtx, and df_mw_hardreg::start_regno.

Referenced by df_note_bb_compute().

static void df_set_note ( )
inlinestatic
Set a NOTE_TYPE note for REG in INSN.   

References add_reg_note().

Referenced by df_create_unused_note(), df_note_bb_compute(), df_set_dead_notes_for_mw(), and df_set_unused_notes_for_mw().

static void df_set_unused_notes_for_mw ( rtx  insn,
struct df_mw_hardreg mws,
bitmap  live,
bitmap  do_not_gen,
bitmap  artificial_uses,
struct dead_debug_local debug 
)
static
Set the REG_UNUSED notes for the multiword hardreg defs in INSN
   based on the bits in LIVE.  Do not generate notes for registers in
   artificial uses.  DO_NOT_GEN is updated so that REG_DEAD notes are
   not generated if the reg is both read and written by the
   instruction.

References bitmap_bit_p(), bitmap_set_bit(), dead_debug_insert_temp(), DEBUG_TEMP_AFTER_WITH_REG, df_print_note(), df_set_note(), df_whole_mw_reg_unused_p(), dump_file, df_mw_hardreg::end_regno, df_mw_hardreg::mw_reg, regno_reg_rtx, and df_mw_hardreg::start_regno.

Referenced by df_note_bb_compute().

void df_simulate_defs ( )
Simulate the effects of the defs of INSN on LIVE.   

References bitmap_clear_bit(), DF_REF_CONDITIONAL, and DF_REF_PARTIAL.

Referenced by can_move_insns_across(), dce_process_block(), and df_simulate_one_insn_backwards().

void df_simulate_finalize_backwards ( )
Apply the artificial uses and defs at the top of BB in a backwards
   direction.   

References bitmap_clear_bit(), bitmap_set_bit(), df_get_artificial_defs(), df_get_artificial_uses(), DF_REF_AT_TOP, and basic_block_def::index.

Referenced by dce_process_block().

void df_simulate_find_defs ( )
Find the set of DEFs for INSN.   

References bitmap_set_bit().

Referenced by can_move_insns_across(), dead_or_predicable(), and find_comparisons_in_bb().

void df_simulate_find_noclobber_defs ( )
Find the set of real DEFs, which are not clobbers, for INSN.   

References bitmap_set_bit(), DF_REF_MAY_CLOBBER, and DF_REF_MUST_CLOBBER.

Referenced by df_simulate_one_insn_forwards().

static void df_simulate_find_uses ( )
static
Find the set of uses for INSN.  This includes partial defs.   

References bitmap_set_bit(), DF_REF_CONDITIONAL, and DF_REF_PARTIAL.

Referenced by can_move_insns_across().

static void df_simulate_fixup_sets ( )
inlinestatic
void df_simulate_initialize_backwards ( )
Apply the artificial uses and defs at the end of BB in a backwards
   direction.   

References bitmap_clear_bit(), bitmap_set_bit(), df_get_artificial_defs(), df_get_artificial_uses(), DF_REF_AT_TOP, and basic_block_def::index.

Referenced by can_move_insns_across(), dce_process_block(), and simulate_backwards_to_point().

void df_simulate_initialize_forwards ( )
Initialize the LIVE bitmap, which should be copied from DF_LIVE_IN or
   DF_LR_IN for basic block BB, for forward scanning by marking artificial
   defs live.   

References bitmap_set_bit(), df_get_artificial_defs(), DF_REF_AT_TOP, and basic_block_def::index.

Referenced by dse_step1(), and peephole2_optimize().

void df_simulate_one_insn_backwards ( )
void df_simulate_one_insn_forwards ( )
Simulate the forwards effects of INSN on the bitmap LIVE.   

References bitmap_clear_bit(), bitmap_clear_range(), df_simulate_find_noclobber_defs(), and df_simulate_fixup_sets().

Referenced by dse_step1(), peep2_fill_buffer(), and single_def_use_enter_block().

void df_simulate_uses ( )
Simulate the effects of the uses of INSN on LIVE.   

References bitmap_set_bit().

Referenced by can_move_insns_across(), dce_process_block(), dead_or_predicable(), and df_simulate_one_insn_backwards().

static bool df_whole_mw_reg_dead_p ( struct df_mw_hardreg mws,
bitmap  live,
bitmap  artificial_uses,
bitmap  do_not_gen 
)
static
A subroutine of df_set_dead_notes_for_mw, with a selection of its
   arguments.  Return true if the register value described by MWS's
   mw_reg is known to be completely dead, and if mw_reg can therefore
   be used in a REG_DEAD note.   

References bitmap_bit_p(), DF_REF_PARTIAL, df_mw_hardreg::flags, df_mw_hardreg::mw_reg, and df_mw_hardreg::start_regno.

Referenced by df_set_dead_notes_for_mw().

static bool df_whole_mw_reg_unused_p ( struct df_mw_hardreg mws,
bitmap  live,
bitmap  artificial_uses 
)
static
A subroutine of df_set_unused_notes_for_mw, with a selection of its
   arguments.  Return true if the register value described by MWS's
   mw_reg is known to be completely unused, and if mw_reg can therefore
   be used in a REG_UNUSED note.   

References bitmap_bit_p(), DF_REF_PARTIAL, df_mw_hardreg::flags, df_mw_hardreg::mw_reg, and df_mw_hardreg::start_regno.

Referenced by df_set_unused_notes_for_mw().

void df_word_lr_add_problem ( void  )
Create a new DATAFLOW instance and add it to an existing instance
   of DF.  The returned structure is what is used to get at the
   solution.   

References df_add_problem(), and df_bitmap_obstack.

Referenced by run_word_dce().

static void df_word_lr_alloc ( )
static
static void df_word_lr_bb_local_compute ( )
static
static void df_word_lr_bottom_dump ( )
static
static bool df_word_lr_confluence_n ( )
static
static void df_word_lr_free ( )
static
Free all storage associated with the problem.   

References bitmap_obstack_release(), free(), and df_word_lr_problem_data::word_lr_bitmaps.

static void df_word_lr_free_bb_info ( basic_block  bb,
void *  vbb_info 
)
static
static void df_word_lr_init ( )
static
static void df_word_lr_local_compute ( )
static
Compute local live register info for each basic block within BLOCKS.   

References bitmap_clear(), df, df_word_lr_bb_local_compute(), and df_d::exit_block_uses.

bool df_word_lr_mark_ref ( )
Examine REF, and if it is for a reg we're interested in, set or
   clear the bits corresponding to its subwords from the bitmap
   according to IS_SET.  LIVE is the bitmap we should update.  We do
   not track hard regs or pseudos of any size other than 2 *
   UNITS_PER_WORD.
   We return true if we changed the bitmap, or if we encountered a register
   we're not tracking.   

References bitmap_clear_bit(), bitmap_set_bit(), changed, df_read_modify_subreg_p(), DF_REF_PARTIAL, reg_mode, and subreg_lowpart_p().

Referenced by df_word_lr_bb_local_compute(), df_word_lr_simulate_defs(), and df_word_lr_simulate_uses().

static void df_word_lr_reset ( )
static
Reset the global solution for recalculation.   

References bitmap_clear(), df_word_lr_get_bb_info(), df_word_lr_bb_info::in, and df_word_lr_bb_info::out.

bool df_word_lr_simulate_defs ( )
Simulate the effects of the defs of INSN on LIVE.  Return true if we changed
   any bits, which is used by the caller to determine whether a set is
   necessary.  We also return true if there are other reasons not to delete
   an insn.   

References changed, DF_REF_CONDITIONAL, and df_word_lr_mark_ref().

Referenced by word_dce_process_block().

void df_word_lr_simulate_uses ( )
Simulate the effects of the uses of INSN on LIVE.   

References df_word_lr_mark_ref().

Referenced by word_dce_process_block().

static void df_word_lr_top_dump ( )
static
static bool df_word_lr_transfer_function ( )
static
static int find_memory ( )
static
A subroutine of can_move_insns_across_p called through for_each_rtx.
   Return either MEMREF_NORMAL or MEMREF_VOLATILE if a memory is found.   

Referenced by can_move_insns_across().

static void find_memory_stores ( rtx  x,
const_rtx  pat,
void *  data 
)
static
A subroutine of can_move_insns_across_p called through note_stores.
   DATA points to an integer in which we set either the bit for
   MEMREF_NORMAL or the bit for MEMREF_VOLATILE if we find a MEM
   of either kind.   

References pflags.

Referenced by can_move_insns_across().

void simulate_backwards_to_point ( )
Scan BB backwards, using df_simulate functions to keep track of
   lifetimes, up to insn POINT.  The result is stored in LIVE.   

References bitmap_copy(), df_get_live_out(), df_simulate_initialize_backwards(), and df_simulate_one_insn_backwards().

Referenced by dead_or_predicable(), and try_head_merge_bb().


Variable Documentation

bitmap_head df_live_scratch
static
Scratch var used by transfer functions.  This is used to implement
   an optimization to reduce the amount of space used to compute the
   combined lr and live analysis.   
bitmap_head df_md_scratch
static
Scratch var used by transfer functions.  This is used to do md analysis
   only for live registers.   
struct df_problem problem_CHAIN
static
Initial value:
struct df_problem problem_LIVE
static
struct df_problem problem_LR
static
Initial value:
All of the information associated with every instance of the problem.   
struct df_problem problem_MD
static
struct df_problem problem_NOTE
static
Initial value:
{
DF_NOTE,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (struct df_scan_bb_info),
TV_DF_NOTE,
false
}
All of the information associated every instance of the problem.   
struct df_problem problem_RD
static
Initial value:
All of the information associated with every instance of the problem.   
struct df_problem problem_WORD_LR
static
Initial value:
All of the information associated with every instance of the problem.   
bitmap_head seen_in_block
static
bitmap_head seen_in_insn
static