GCC Middle and Back End API Reference
|
Data Structures | |
struct | comparison_use |
struct | comparison |
Typedefs | |
typedef struct comparison * | comparison_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_pass * | make_pass_compare_elim_after_reload () |
Variables | |
static vec< comparison_struct_p > | all_compares |
typedef struct comparison* comparison_struct_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 |
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 |
Main entry point to the pass.
References df_analyze(), find_comparisons(), and try_eliminate_compare().
|
static |
Find all comparisons in the function.
References dom_walk_data::before_dom_children, calculate_dominance_info(), CDI_DOMINATORS, clear_aux_for_blocks(), find_comparisons_in_bb(), fini_walk_dominator_tree(), free_dominance_info(), init_walk_dominator_tree(), memset(), and walk_dominator_tree().
Referenced by execute_compare_elim_after_reload().
|
static |
Identify comparison instructions within BB. If the flags from the last compare in the BB is live at the end of the block, install the compare in BB->AUX. Called via walk_dominators_tree.
References arithmetic_flags_clobber_p(), basic_block_def::aux, bitmap_bit_p(), bitmap_clear(), conforming_compare(), delete_insn(), edge_def::dest, df_get_live_in(), df_get_live_out(), df_simulate_find_defs(), find_flags_uses_in_insn(), gen_rtx_REG(), comparison::in_a, comparison::in_b, comparison::inputs_valid, comparison::insn, comparison::missing_uses, new_mode(), comparison::orig_mode, comparison::prev_clobber, rtx_equal_p(), single_pred(), single_pred_p(), basic_block_def::succs, targetm, and validate_change().
Referenced by find_comparisons().
|
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 |
References targetm.
rtl_opt_pass* make_pass_compare_elim_after_reload | ( | ) |
|
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 |
Attempt to replace a comparison with a prior arithmetic insn that can compute the same flags value as the comparison itself. Return true if successful, having made all rtl modifications necessary.
References apply_change_group(), copy_rtx(), delete_insn(), DF_REF_CONDITIONAL, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_PARTIAL, DF_REF_PRE_POST_MODIFY, DF_REF_SIGN_EXTRACT, DF_REF_STRICT_LOW_PART, DF_REF_ZERO_EXTRACT, find_reg_note(), find_regno_note(), gen_rtx_REG(), comparison::in_a, comparison::in_b, comparison::insn, maybe_select_cc_mode(), comparison::orig_mode, comparison::prev_clobber, remove_note(), rtx_equal_p(), targetm, and validate_change().
Referenced by execute_compare_elim_after_reload().
|
static |