summaryrefslogtreecommitdiff
path: root/gcc/ira-lives.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2014-06-15 07:32:28 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-06-15 07:32:28 +0000
commitbfac633a90588e96050f8767052d59efd7307cb1 (patch)
tree00fa07671c5adda4b362c1895d5e45e61ae0175b /gcc/ira-lives.c
parent2c73339ae90070d7b33cb64a6d7461fbf676a53e (diff)
downloadgcc-bfac633a90588e96050f8767052d59efd7307cb1.tar.gz
df.h (DF_INSN_INFO_MWS, [...]): New macros.
gcc/ * df.h (DF_INSN_INFO_MWS, FOR_EACH_INSN_INFO_DEF): New macros. (FOR_EACH_INSN_INFO_USE, FOR_EACH_INSN_INFO_EQ_USE): Likewise. (FOR_EACH_INSN_DEF, FOR_EACH_INSN_USE, FOR_EACH_INSN_EQ_USE): Likewise. * auto-inc-dec.c (find_inc, merge_in_block): Use them. * combine.c (create_log_links): Likewise. * compare-elim.c (find_flags_uses_in_insn): Likewise. (try_eliminate_compare): Likewise. * cprop.c (make_set_regs_unavailable, mark_oprs_set): Likewise. * dce.c (deletable_insn_p, find_call_stack_args): Likewise. (remove_reg_equal_equiv_notes_for_defs): Likewise. (reset_unmarked_insns_debug_uses, mark_reg_dependencies): Likewise. (word_dce_process_block, dce_process_block): Likewise. * ddg.c (def_has_ccmode_p): Likewise. * df-core.c (df_bb_regno_first_def_find): Likewise. (df_bb_regno_last_def_find, df_find_def, df_find_use): Likewise. * df-problems.c (df_rd_simulate_one_insn): Likewise. (df_lr_bb_local_compute, df_live_bb_local_compute): Likewise. (df_chain_remove_problem, df_chain_insn_top_dump): Likewise. (df_chain_insn_bottom_dump, df_word_lr_bb_local_compute): Likewise. (df_word_lr_simulate_defs, df_word_lr_simulate_uses): Likewise. (df_remove_dead_eq_notes, df_note_bb_compute): Likewise. (df_simulate_find_defs, df_simulate_find_uses): Likewise. (df_simulate_find_noclobber_defs, df_simulate_defs): Likewise. (df_simulate_uses, df_md_simulate_one_insn): Likewise. * df-scan.c (df_reorganize_refs_by_reg_by_insn): Likewise. * fwprop.c (local_ref_killed_between_p): Likewise. (all_uses_available_at, free_load_extend): Likewise. * gcse.c (update_bb_reg_pressure, calculate_bb_reg_pressure): Likewise. * hw-doloop.c (scan_loop): Likewise. * ifcvt.c (dead_or_predicable): Likewise. * init-regs.c (initialize_uninitialized_regs): Likewise. * ira-lives.c (mark_hard_reg_early_clobbers): Likewise. (process_bb_node_lives): Likewise. * ira.c (compute_regs_asm_clobbered, build_insn_chain): Likewise. (find_moveable_pseudos): Likewise. * loop-invariant.c (check_dependencies, record_uses): Likewise. * recog.c (peep2_find_free_register): Likewise. * ree.c (get_defs): Likewise. * regstat.c (regstat_bb_compute_ri): Likewise. (regstat_bb_compute_calls_crossed): Likewise. * sched-deps.c (find_inc, find_mem): Likewise. * sel-sched-ir.c (maybe_downgrade_id_to_use): Likewise. (maybe_downgrade_id_to_use, setup_id_reg_sets): Likewise. * shrink-wrap.c (requires_stack_frame_p): Likewise. (prepare_shrink_wrap): Likewise. * store-motion.c (compute_store_table, build_store_vectors): Likewise. * web.c (union_defs, pass_web::execute): Likewise. * config/i386/i386.c (increase_distance, insn_defines_reg): Likewise. (insn_uses_reg_mem, ix86_ok_to_clobber_flags): Likewise. From-SVN: r211678
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r--gcc/ira-lives.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 601613bc995..ec8f679bcee 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -725,13 +725,13 @@ make_early_clobber_and_input_conflicts (void)
static bool
mark_hard_reg_early_clobbers (rtx insn, bool live_p)
{
- df_ref *def_rec;
+ df_ref def;
bool set_p = false;
- for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
- if (DF_REF_FLAGS_IS_SET (*def_rec, DF_REF_MUST_CLOBBER))
+ FOR_EACH_INSN_DEF (def, insn)
+ if (DF_REF_FLAGS_IS_SET (def, DF_REF_MUST_CLOBBER))
{
- rtx dreg = DF_REF_REG (*def_rec);
+ rtx dreg = DF_REF_REG (def);
if (GET_CODE (dreg) == SUBREG)
dreg = SUBREG_REG (dreg);
@@ -742,9 +742,9 @@ mark_hard_reg_early_clobbers (rtx insn, bool live_p)
because there is no way to say that non-operand hard
register clobbers are not early ones. */
if (live_p)
- mark_ref_live (*def_rec);
+ mark_ref_live (def);
else
- mark_ref_dead (*def_rec);
+ mark_ref_dead (def);
set_p = true;
}
@@ -1114,7 +1114,7 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
pessimistic, but it probably doesn't matter much in practice. */
FOR_BB_INSNS_REVERSE (bb, insn)
{
- df_ref *def_rec, *use_rec;
+ df_ref def, use;
bool call_p;
if (!NONDEBUG_INSN_P (insn))
@@ -1135,9 +1135,9 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
live would stop us from allocating it to a call-crossing
allocno. */
call_p = CALL_P (insn);
- for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
- if (!call_p || !DF_REF_FLAGS_IS_SET (*def_rec, DF_REF_MAY_CLOBBER))
- mark_ref_live (*def_rec);
+ FOR_EACH_INSN_DEF (def, insn)
+ if (!call_p || !DF_REF_FLAGS_IS_SET (def, DF_REF_MAY_CLOBBER))
+ mark_ref_live (def);
/* If INSN has multiple outputs, then any value used in one
of the outputs conflicts with the other outputs. Model this
@@ -1151,12 +1151,12 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
to the same hard register as an unused output we could
set the hard register before the output reload insn. */
if (GET_CODE (PATTERN (insn)) == PARALLEL && multiple_sets (insn))
- for (use_rec = DF_INSN_USES (insn); *use_rec; use_rec++)
+ FOR_EACH_INSN_USE (use, insn)
{
int i;
rtx reg;
- reg = DF_REF_REG (*use_rec);
+ reg = DF_REF_REG (use);
for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--)
{
rtx set;
@@ -1167,7 +1167,7 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
{
/* After the previous loop, this is a no-op if
REG is contained within SET_DEST (SET). */
- mark_ref_live (*use_rec);
+ mark_ref_live (use);
break;
}
}
@@ -1178,9 +1178,9 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
process_single_reg_class_operands (false, freq);
/* See which defined values die here. */
- for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
- if (!call_p || !DF_REF_FLAGS_IS_SET (*def_rec, DF_REF_MAY_CLOBBER))
- mark_ref_dead (*def_rec);
+ FOR_EACH_INSN_DEF (def, insn)
+ if (!call_p || !DF_REF_FLAGS_IS_SET (def, DF_REF_MAY_CLOBBER))
+ mark_ref_dead (def);
if (call_p)
{
@@ -1249,8 +1249,8 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
curr_point++;
/* Mark each used value as live. */
- for (use_rec = DF_INSN_USES (insn); *use_rec; use_rec++)
- mark_ref_live (*use_rec);
+ FOR_EACH_INSN_USE (use, insn)
+ mark_ref_live (use);
process_single_reg_class_operands (true, freq);
@@ -1263,16 +1263,16 @@ process_bb_node_lives (ira_loop_tree_node_t loop_tree_node)
/* Mark each hard reg as live again. For example, a
hard register can be in clobber and in an insn
input. */
- for (use_rec = DF_INSN_USES (insn); *use_rec; use_rec++)
+ FOR_EACH_INSN_USE (use, insn)
{
- rtx ureg = DF_REF_REG (*use_rec);
+ rtx ureg = DF_REF_REG (use);
if (GET_CODE (ureg) == SUBREG)
ureg = SUBREG_REG (ureg);
if (! REG_P (ureg) || REGNO (ureg) >= FIRST_PSEUDO_REGISTER)
continue;
- mark_ref_live (*use_rec);
+ mark_ref_live (use);
}
}