GCC Middle and Back End API Reference
|
Data Structures | |
struct | queued_debug_insn_change |
struct | value_data_entry |
struct | value_data |
struct | kill_set_value_data |
Functions | |
static void | kill_value_one_regno (unsigned, struct value_data *) |
static void | kill_value_regno (unsigned, unsigned, struct value_data *) |
static void | kill_value (rtx, struct value_data *) |
static void | set_value_regno (unsigned, enum machine_mode, struct value_data *) |
static void | init_value_data (struct value_data *) |
static void | kill_clobbered_value (rtx, const_rtx, void *) |
static void | kill_set_value (rtx, const_rtx, void *) |
static int | kill_autoinc_value (rtx *, void *) |
static void | copy_value (rtx, rtx, struct value_data *) |
static bool | mode_change_ok (enum machine_mode, enum machine_mode, unsigned int) |
static rtx | maybe_mode_change (enum machine_mode, enum machine_mode, enum machine_mode, unsigned int, unsigned int) |
static rtx | find_oldest_value_reg (enum reg_class, rtx, struct value_data *) |
static bool | replace_oldest_value_reg (rtx *, enum reg_class, rtx, struct value_data *) |
static bool | replace_oldest_value_addr (rtx *, enum reg_class, enum machine_mode, addr_space_t, rtx, struct value_data *) |
static bool | replace_oldest_value_mem (rtx, rtx, struct value_data *) |
static bool | copyprop_hardreg_forward_1 (basic_block, struct value_data *) |
void | debug_value_data (struct value_data *) |
static void | validate_value_data (struct value_data *) |
static void | free_debug_insn_changes () |
static void | kill_value_one_regno () |
static void | kill_value_regno (unsigned int regno, unsigned int nregs, struct value_data *vd) |
static void | kill_value () |
static void | set_value_regno (unsigned int regno, enum machine_mode mode, struct value_data *vd) |
static void | init_value_data () |
static void | kill_clobbered_value () |
static void | kill_set_value () |
static int | kill_autoinc_value () |
static void | copy_value () |
static rtx | find_oldest_value_reg () |
static bool | replace_oldest_value_mem () |
static void | apply_debug_insn_changes () |
static int | cprop_find_used_regs_1 () |
static void | cprop_find_used_regs () |
static bool | copyprop_hardreg_forward_1 () |
static unsigned int | copyprop_hardreg_forward () |
DEBUG_FUNCTION void | debug_value_data () |
static void | validate_value_data () |
static bool | gate_handle_cprop () |
rtl_opt_pass * | make_pass_cprop_hardreg () |
Variables | |
static alloc_pool | debug_insn_changes_pool |
|
static |
Apply all queued updates for DEBUG_INSNs that change some reg to register REGNO.
References apply_change_group(), value_data_entry::debug_insn_changes, value_data::e, queued_debug_insn_change::insn, queued_debug_insn_change::loc, queued_debug_insn_change::new_rtx, queued_debug_insn_change::next, and validate_change().
Referenced by copyprop_hardreg_forward(), and cprop_find_used_regs_1().
|
static |
Referenced by copyprop_hardreg_forward_1().
|
static |
Assert that SRC has been copied to DEST. Adjust the data structures to reflect that SRC contains an older copy of the shared value.
References value_data::e, global_regs, value_data_entry::mode, value_data_entry::next_regno, value_data_entry::oldest_regno, set_value_regno(), and validate_value_data().
|
static |
Main entry point for the forward copy propagation optimization.
References apply_debug_insn_changes(), bitmap_bit_p(), bitmap_clear(), bitmap_set_bit(), copyprop_hardreg_forward_1(), create_alloc_pool(), value_data_entry::debug_insn_changes, df_analyze(), df_get_live_out(), value_data::e, free(), free_alloc_pool(), basic_block_def::index, init_value_data(), live, value_data::n_debug_insn_changes, sbitmap_alloc(), sbitmap_free(), single_pred(), single_pred_edge(), single_pred_p(), and visited.
|
static |
Referenced by copyprop_hardreg_forward().
|
static |
Perform the forward copy propagation on basic block BB.
References apply_change_group(), asm_noperands(), changed, operand_alternative::cl, constrain_operands(), recog_data_d::constraints, copy_value(), cprop_find_used_regs(), dump_file, recog_data_d::dup_loc, recog_data_d::dup_num, value_data::e, exp(), extract_insn(), find_oldest_value_reg(), for_each_rtx(), kill_set_value_data::ignore_set_reg, kill_autoinc_value(), kill_clobbered_value(), kill_set_value(), kill_value(), kill_value_regno(), operand_alternative::matches, maybe_mode_change(), value_data_entry::mode, value_data::n_debug_insn_changes, recog_data_d::n_dups, recog_data_d::n_operands, value_data_entry::next_regno, note_stores(), note_uses(), value_data_entry::oldest_regno, OP_IN, OP_INOUT, OP_OUT, recog_data_d::operand, recog_data_d::operand_loc, recog_data_d::operand_type, preprocess_constraints(), recog_data, recog_op_alt, replace_oldest_value_addr(), replace_oldest_value_mem(), replace_oldest_value_reg(), SET, set_value_regno(), validate_change(), validate_unshare_change(), kill_set_value_data::vd, and which_alternative.
|
static |
Called via note_uses, for all used registers in a real insn apply DEBUG_INSN changes that change registers to the used registers.
References cprop_find_used_regs_1(), and for_each_rtx().
Referenced by copyprop_hardreg_forward_1().
|
static |
Called via for_each_rtx, for all used registers in a real insn apply DEBUG_INSN changes that change registers to the used register.
References apply_debug_insn_changes(), value_data_entry::debug_insn_changes, value_data::e, and free_debug_insn_changes().
Referenced by cprop_find_used_regs().
void debug_value_data | ( | struct value_data * | ) |
DEBUG_FUNCTION void debug_value_data | ( | ) |
Dump the value chain data to stderr.
References value_data::e, value_data_entry::mode, value_data_entry::next_regno, and value_data_entry::oldest_regno.
|
static |
Referenced by copyprop_hardreg_forward_1(), and replace_oldest_value_reg().
|
static |
Find the oldest copy of the value contained in REGNO that is in register class CL and has mode MODE. If found, return an rtx of that oldest register, otherwise return NULL.
References value_data::e, in_hard_reg_set_p(), maybe_mode_change(), value_data_entry::mode, value_data_entry::next_regno, and value_data_entry::oldest_regno.
|
static |
Free all queued updates for DEBUG_INSNs that change some reg to register REGNO.
References value_data_entry::debug_insn_changes, value_data::e, value_data::n_debug_insn_changes, queued_debug_insn_change::next, and pool_free().
Referenced by cprop_find_used_regs_1(), and kill_value_one_regno().
|
static |
|
static |
Referenced by copyprop_hardreg_forward().
|
static |
Initialize VD such that there are no known relationships between regs.
References value_data_entry::debug_insn_changes, value_data::e, value_data::max_value_regs, value_data_entry::mode, value_data::n_debug_insn_changes, value_data_entry::next_regno, and value_data_entry::oldest_regno.
|
static |
Referenced by copyprop_hardreg_forward_1().
|
static |
Called through for_each_rtx. Kill any register used as the base of an auto-increment expression, and install that register as the root of its own value list.
References kill_value(), RTX_AUTOINC, and set_value_regno().
Referenced by copyprop_hardreg_forward_1().
|
static |
Called through note_stores. If X is clobbered, kill its value.
References kill_value().
Referenced by copyprop_hardreg_forward_1().
|
static |
Called through note_stores. If X is set, not clobbered, kill its current value and install it as the root of its own value list.
References kill_set_value_data::ignore_set_reg, kill_value(), rtx_equal_p(), set_value_regno(), and kill_set_value_data::vd.
|
static |
Referenced by copyprop_hardreg_forward_1(), kill_autoinc_value(), kill_clobbered_value(), and kill_set_value().
|
static |
Kill X. This is a convenience function wrapping kill_value_regno so that we mind the mode the register is in.
References kill_value_regno(), and simplify_subreg().
|
static |
Referenced by kill_value_regno().
|
static |
Kill register REGNO. This involves removing it from any value lists, and resetting the value mode to VOIDmode. This is only a helper function; it does not handle any hard registers overlapping with REGNO.
References value_data_entry::debug_insn_changes, value_data::e, free_debug_insn_changes(), value_data_entry::mode, queued_debug_insn_change::next, value_data_entry::next_regno, value_data_entry::oldest_regno, and validate_value_data().
|
static |
Referenced by copyprop_hardreg_forward_1(), and kill_value().
|
static |
Kill the value in register REGNO for NREGS, and any other registers whose values overlap.
References value_data::e, kill_value_one_regno(), value_data::max_value_regs, max_value_regs, and value_data_entry::mode.
rtl_opt_pass* make_pass_cprop_hardreg | ( | ) |
|
static |
Register REGNO was originally set in ORIG_MODE. It - or a copy of it - was copied in COPY_MODE to COPY_REGNO, and then COPY_REGNO was accessed in NEW_MODE. Return a NEW_MODE rtx for REGNO if that's OK, otherwise return NULL_RTX.
References mode_change_ok(), new_mode(), offset, and subreg_regno_offset().
Referenced by copyprop_hardreg_forward_1(), and find_oldest_value_reg().
|
static |
Return true if a mode change from ORIG to NEW is allowed for REGNO.
Referenced by maybe_mode_change().
|
static |
Similar to replace_oldest_value_reg, but *LOC contains an address. Adapted from find_reloads_address_1. CL is INDEX_REG_CLASS or BASE_REG_CLASS depending on how the register is being considered.
References base_reg_class(), changed, queued_debug_insn_change::loc, regno_ok_for_base_p(), replace_oldest_value_mem(), and replace_oldest_value_reg().
Referenced by copyprop_hardreg_forward_1(), and replace_oldest_value_mem().
|
static |
Referenced by copyprop_hardreg_forward_1(), and replace_oldest_value_addr().
|
static |
Similar to replace_oldest_value_reg, but X contains a memory.
References base_reg_class(), and replace_oldest_value_addr().
|
static |
If possible, replace the register at *LOC with the oldest register in register class CL. Return true if successfully replaced.
References value_data_entry::debug_insn_changes, dump_file, value_data::e, find_oldest_value_reg(), queued_debug_insn_change::insn, queued_debug_insn_change::loc, value_data::n_debug_insn_changes, queued_debug_insn_change::new_rtx, queued_debug_insn_change::next, pool_alloc(), and validate_change().
Referenced by copyprop_hardreg_forward_1(), and replace_oldest_value_addr().
|
static |
Referenced by copy_value(), copyprop_hardreg_forward_1(), kill_autoinc_value(), and kill_set_value().
|
static |
Remember that REGNO is valid in MODE.
References value_data::e, value_data::max_value_regs, and value_data_entry::mode.
|
static |
Referenced by copy_value(), and kill_value_one_regno().
|
static |
|
static |