GCC Middle and Back End API Reference
compare-elim.c File Reference

Data Structures

struct  comparison_use
struct  comparison

Typedefs

typedef struct comparisoncomparison_struct_p

Functions

static rtx conforming_compare ()
static bool arithmetic_flags_clobber_p ()
static void find_flags_uses_in_insn ()
static void find_comparisons_in_bb (struct dom_walk_data *data, basic_block bb)
static void find_comparisons ()
static rtx maybe_select_cc_mode (struct comparison *cmp, rtx a, rtx b)
static bool try_eliminate_compare ()
static unsigned int execute_compare_elim_after_reload ()
static bool gate_compare_elim_after_reload ()
rtl_opt_passmake_pass_compare_elim_after_reload ()

Variables

static vec< comparison_struct_pall_compares

Typedef Documentation


Function Documentation

static bool arithmetic_flags_clobber_p ( )
static
Look for a pattern of the "correct" form for an insn with a flags clobber
   for which we may be able to eliminate a compare later.  We're not looking
   to validate any inputs at this time, merely see that the basic shape is
   correct.  The term "arithmetic" may be somewhat misleading...   

References extract_asm_operands(), SET, and targetm.

Referenced by find_comparisons_in_bb().

static rtx conforming_compare ( )
static
Look for a "conforming" comparison, as defined above.  If valid, return
   the rtx for the COMPARE itself.   

References targetm.

Referenced by find_comparisons_in_bb().

static unsigned int execute_compare_elim_after_reload ( )
static
Main entry point to the pass.   

References df_analyze(), find_comparisons(), and try_eliminate_compare().

static void find_comparisons_in_bb ( struct dom_walk_data data,
basic_block  bb 
)
static
static void find_flags_uses_in_insn ( )
static
Look for uses of FLAGS in INSN.  If we find one we can analyze, record
   it in CMP; otherwise indicate that we've missed a use.   

References comparison_use::code, DF_REF_REG_USE, comparison_use::insn, comparison_use::loc, comparison::missing_uses, comparison::n_uses, targetm, and comparison::uses.

Referenced by find_comparisons_in_bb().

static bool gate_compare_elim_after_reload ( )
static

References targetm.

rtl_opt_pass* make_pass_compare_elim_after_reload ( )
static rtx maybe_select_cc_mode ( struct comparison cmp,
rtx  a,
rtx  b 
)
static
Select an alternate CC_MODE for a comparison insn comparing A and B.
   Note that inputs are almost certainly different than the IN_A and IN_B
   stored in CMP -- we're called while attempting to eliminate the compare
   after all.  Return the new FLAGS rtx if successful, else return NULL.
   Note that this function may start a change group.   

References comparison_use::code, gen_rtx_REG(), comparison_use::insn, comparison_use::loc, comparison::missing_uses, comparison::n_uses, new_mode(), comparison::orig_mode, targetm, comparison::uses, and validate_change().

Referenced by try_eliminate_compare().

static bool try_eliminate_compare ( )
static

Variable Documentation

vec<comparison_struct_p> all_compares
static