diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-15 07:32:54 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-15 07:32:54 +0000 |
commit | f8d8375042bce47a20a4027e165d4316d427baa6 (patch) | |
tree | b6c4e39bde41278d890cc3b12c57dc3a8880be25 /gcc/regstat.c | |
parent | f1c570a65fd6f54d7e67f429189189c69dea9f2e (diff) | |
download | gcc-f8d8375042bce47a20a4027e165d4316d427baa6.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211680 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regstat.c')
-rw-r--r-- | gcc/regstat.c | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/gcc/regstat.c b/gcc/regstat.c index 10135b3022c..9dff2680c46 100644 --- a/gcc/regstat.c +++ b/gcc/regstat.c @@ -153,7 +153,7 @@ regstat_bb_compute_ri (unsigned int bb_index, { struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); bitmap_iterator bi; - struct df_mw_hardreg **mws_rec; + df_mw_hardreg *mw; rtx link; if (!NONDEBUG_INSN_P (insn)) @@ -202,29 +202,26 @@ regstat_bb_compute_ri (unsigned int bb_index, /* We only care about real sets for calls. Clobbers cannot be depended on. Only do this if the value is totally dead. */ - for (mws_rec = DF_INSN_INFO_MWS (insn_info); *mws_rec; mws_rec++) - { - struct df_mw_hardreg *mws = *mws_rec; - if (DF_MWS_REG_DEF_P (mws)) - { - bool all_dead = true; - unsigned int r; - - for (r = mws->start_regno; r <= mws->end_regno; r++) - if (bitmap_bit_p (artificial_uses, r) - || bitmap_bit_p (live, r)) - { - all_dead = false; - break; - } - - if (all_dead) + FOR_EACH_INSN_INFO_MW (mw, insn_info) + if (DF_MWS_REG_DEF_P (mw)) + { + bool all_dead = true; + unsigned int r; + + for (r = mw->start_regno; r <= mw->end_regno; r++) + if (bitmap_bit_p (artificial_uses, r) + || bitmap_bit_p (live, r)) { - regno = mws->start_regno; - REG_LIVE_LENGTH (regno)++; + all_dead = false; + break; } - } - } + + if (all_dead) + { + regno = mw->start_regno; + REG_LIVE_LENGTH (regno)++; + } + } /* All of the defs except the return value are some sort of clobber. This code is for the return. */ |