+2014-08-22 David Malcolm <dmalcolm@redhat.com>
+
+ * fwprop.c (single_def_use_dom_walker::before_dom_children):
+ Strengthen local "insn" from rtx to rtx_insn *.
+ (use_killed_between): Likewise for param "target_insn".
+ (all_uses_available_at): Likewise for param "target_insn" and
+ local "next".
+ (update_df_init): Likewise for params "def_insn", "insn".
+ (update_df): Likewise for param "insn".
+ (try_fwprop_subst): Likewise for param "def_insn" and local
+ "insn".
+ (free_load_extend): Likewise for param "insn".
+ (forward_propagate_subreg): Likewise for param "def_insn" and
+ local "use_insn".
+ (forward_propagate_asm): Likewise for param "def_insn" and local
+ "use_insn".
+ (forward_propagate_and_simplify): Likewise for param "def_insn"
+ and local "use_insn".
+ (forward_propagate_into): Likewise for locals "def_insn" and
+ "use_insn".
+
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* function.c (emit_initial_value_sets): Strengthen local "seq"
int bb_index = bb->index;
struct df_md_bb_info *md_bb_info = df_md_get_bb_info (bb_index);
struct df_lr_bb_info *lr_bb_info = df_lr_get_bb_info (bb_index);
- rtx insn;
+ rtx_insn *insn;
bitmap_copy (local_md, &md_bb_info->in);
bitmap_copy (local_lr, &lr_bb_info->in);
we check if the definition is killed after DEF_INSN or before
TARGET_INSN insn, in their respective basic blocks. */
static bool
-use_killed_between (df_ref use, rtx def_insn, rtx target_insn)
+use_killed_between (df_ref use, rtx_insn *def_insn, rtx_insn *target_insn)
{
basic_block def_bb = BLOCK_FOR_INSN (def_insn);
basic_block target_bb = BLOCK_FOR_INSN (target_insn);
would require full computation of available expressions;
we check only restricted conditions, see use_killed_between. */
static bool
-all_uses_available_at (rtx def_insn, rtx target_insn)
+all_uses_available_at (rtx_insn *def_insn, rtx_insn *target_insn)
{
df_ref use;
struct df_insn_info *insn_info = DF_INSN_INFO_GET (def_insn);
rtx def_set = single_set (def_insn);
- rtx next;
+ rtx_insn *next;
gcc_assert (def_set);
I'm not doing this yet, though. */
static void
-update_df_init (rtx def_insn, rtx insn)
+update_df_init (rtx_insn *def_insn, rtx_insn *insn)
{
#ifdef ENABLE_CHECKING
sparseset_clear (active_defs_check);
uses if NOTES_ONLY is true. */
static void
-update_df (rtx insn, rtx note)
+update_df (rtx_insn *insn, rtx note)
{
struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
performed. */
static bool
-try_fwprop_subst (df_ref use, rtx *loc, rtx new_rtx, rtx def_insn, bool set_reg_equal)
+try_fwprop_subst (df_ref use, rtx *loc, rtx new_rtx, rtx_insn *def_insn,
+ bool set_reg_equal)
{
- rtx insn = DF_REF_INSN (use);
+ rtx_insn *insn = DF_REF_INSN (use);
rtx set = single_set (insn);
rtx note = NULL_RTX;
bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
load from memory. */
static bool
-free_load_extend (rtx src, rtx insn)
+free_load_extend (rtx src, rtx_insn *insn)
{
rtx reg;
df_ref def, use;
/* If USE is a subreg, see if it can be replaced by a pseudo. */
static bool
-forward_propagate_subreg (df_ref use, rtx def_insn, rtx def_set)
+forward_propagate_subreg (df_ref use, rtx_insn *def_insn, rtx def_set)
{
rtx use_reg = DF_REF_REG (use);
- rtx use_insn, src;
+ rtx_insn *use_insn;
+ rtx src;
/* Only consider subregs... */
enum machine_mode use_mode = GET_MODE (use_reg);
/* Try to replace USE with SRC (defined in DEF_INSN) in __asm. */
static bool
-forward_propagate_asm (df_ref use, rtx def_insn, rtx def_set, rtx reg)
+forward_propagate_asm (df_ref use, rtx_insn *def_insn, rtx def_set, rtx reg)
{
- rtx use_insn = DF_REF_INSN (use), src, use_pat, asm_operands, new_rtx, *loc;
+ rtx_insn *use_insn = DF_REF_INSN (use);
+ rtx src, use_pat, asm_operands, new_rtx, *loc;
int speed_p, i;
df_ref uses;
result. */
static bool
-forward_propagate_and_simplify (df_ref use, rtx def_insn, rtx def_set)
+forward_propagate_and_simplify (df_ref use, rtx_insn *def_insn, rtx def_set)
{
- rtx use_insn = DF_REF_INSN (use);
+ rtx_insn *use_insn = DF_REF_INSN (use);
rtx use_set = single_set (use_insn);
rtx src, reg, new_rtx, *loc;
bool set_reg_equal;
forward_propagate_into (df_ref use)
{
df_ref def;
- rtx def_insn, def_set, use_insn;
+ rtx_insn *def_insn, *use_insn;
+ rtx def_set;
rtx parent;
if (DF_REF_FLAGS (use) & DF_REF_READ_WRITE)