summaryrefslogtreecommitdiff
path: root/gcc/df-problems.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2014-06-15 07:32:54 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-06-15 07:32:54 +0000
commitfc8e9f583cf683a397fef637af4b170fda429021 (patch)
treeb6c4e39bde41278d890cc3b12c57dc3a8880be25 /gcc/df-problems.c
parent292321a5cd9b5988a0e73adaa0ad637a9a17b4d4 (diff)
downloadgcc-fc8e9f583cf683a397fef637af4b170fda429021.tar.gz
df.h (FOR_EACH_INSN_INFO_MW): New macro.
gcc/ * df.h (FOR_EACH_INSN_INFO_MW): New macro. * df-problems.c (df_note_bb_compute): Use it. * regstat.c (regstat_bb_compute_ri): Likewise. From-SVN: r211680
Diffstat (limited to 'gcc/df-problems.c')
-rw-r--r--gcc/df-problems.c58
1 files changed, 20 insertions, 38 deletions
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index 2855eb50cc9..d97e2870aea 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -3114,7 +3114,7 @@ df_note_bb_compute (unsigned int bb_index,
FOR_BB_INSNS_REVERSE (bb, insn)
{
df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
- struct df_mw_hardreg **mws_rec;
+ df_mw_hardreg *mw;
int debug_insn;
if (!INSN_P (insn))
@@ -3137,17 +3137,11 @@ df_note_bb_compute (unsigned int bb_index,
/* We only care about real sets for calls. Clobbers cannot
be depended on to really die. */
- mws_rec = DF_INSN_INFO_MWS (insn_info);
- while (*mws_rec)
- {
- struct df_mw_hardreg *mws = *mws_rec;
- if ((DF_MWS_REG_DEF_P (mws))
- && !df_ignore_stack_reg (mws->start_regno))
- df_set_unused_notes_for_mw (insn,
- mws, live, do_not_gen,
+ FOR_EACH_INSN_INFO_MW (mw, insn_info)
+ if ((DF_MWS_REG_DEF_P (mw))
+ && !df_ignore_stack_reg (mw->start_regno))
+ df_set_unused_notes_for_mw (insn, mw, live, do_not_gen,
artificial_uses, &debug);
- mws_rec++;
- }
/* All of the defs except the return value are some sort of
clobber. This code is for the return. */
@@ -3168,16 +3162,10 @@ df_note_bb_compute (unsigned int bb_index,
else
{
/* Regular insn. */
- mws_rec = DF_INSN_INFO_MWS (insn_info);
- while (*mws_rec)
- {
- struct df_mw_hardreg *mws = *mws_rec;
- if (DF_MWS_REG_DEF_P (mws))
- df_set_unused_notes_for_mw (insn,
- mws, live, do_not_gen,
- artificial_uses, &debug);
- mws_rec++;
- }
+ FOR_EACH_INSN_INFO_MW (mw, insn_info)
+ if (DF_MWS_REG_DEF_P (mw))
+ df_set_unused_notes_for_mw (insn, mw, live, do_not_gen,
+ artificial_uses, &debug);
FOR_EACH_INSN_INFO_DEF (def, insn_info)
{
@@ -3194,25 +3182,19 @@ df_note_bb_compute (unsigned int bb_index,
}
/* Process the uses. */
- mws_rec = DF_INSN_INFO_MWS (insn_info);
- while (*mws_rec)
- {
- struct df_mw_hardreg *mws = *mws_rec;
- if (DF_MWS_REG_USE_P (mws)
- && !df_ignore_stack_reg (mws->start_regno))
- {
- bool really_add_notes = debug_insn != 0;
+ FOR_EACH_INSN_INFO_MW (mw, insn_info)
+ if (DF_MWS_REG_USE_P (mw)
+ && !df_ignore_stack_reg (mw->start_regno))
+ {
+ bool really_add_notes = debug_insn != 0;
- df_set_dead_notes_for_mw (insn,
- mws, live, do_not_gen,
- artificial_uses,
- &really_add_notes);
+ df_set_dead_notes_for_mw (insn, mw, live, do_not_gen,
+ artificial_uses,
+ &really_add_notes);
- if (really_add_notes)
- debug_insn = -1;
- }
- mws_rec++;
- }
+ if (really_add_notes)
+ debug_insn = -1;
+ }
FOR_EACH_INSN_INFO_USE (use, insn_info)
{