From f8d8375042bce47a20a4027e165d4316d427baa6 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Sun, 15 Jun 2014 07:32:54 +0000 Subject: 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 --- gcc/regstat.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'gcc/regstat.c') 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. */ -- cgit v1.2.1