summaryrefslogtreecommitdiff
path: root/gcc/caller-save.c
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-19 17:33:45 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-19 17:33:45 +0000
commit771d46166087ea8e015d1cb02560aa6f212852f2 (patch)
tree65a46d02e15ddf767df696b9661692c68608064a /gcc/caller-save.c
parent794f0924f3b7a206875bd5f0cc86d002f8208d60 (diff)
downloadgcc-771d46166087ea8e015d1cb02560aa6f212852f2.tar.gz
* cfgcleanup.c (mark_effect): Use bitmap_set_range/bitmap_clear_range
instead of loop. Use HARD_REGISTER_NUM_P predicate. * haifa-sched.c (setup_ref_regs): Ditto. * caller-save.c (add_used_regs_1): Ditto. * dse.c (look_for_hardregs): Ditto. * df-problems.c (df_simulate_one_insn_forwards): Ditto. * sched-rgn.c (check_live_1): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171183 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r--gcc/caller-save.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 160d2e9117d..f32d05ffde4 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -1312,7 +1312,7 @@ insert_save (struct insn_chain *chain, int before_p, int regno,
static int
add_used_regs_1 (rtx *loc, void *data)
{
- int regno, i;
+ unsigned int regno;
regset live;
rtx x;
@@ -1321,11 +1321,10 @@ add_used_regs_1 (rtx *loc, void *data)
if (REG_P (x))
{
regno = REGNO (x);
- if (!HARD_REGISTER_NUM_P (regno))
+ if (HARD_REGISTER_NUM_P (regno))
+ bitmap_set_range (live, regno, hard_regno_nregs[regno][GET_MODE (x)]);
+ else
regno = reg_renumber[regno];
- if (regno >= 0)
- for (i = hard_regno_nregs[regno][GET_MODE (x)] - 1; i >= 0; i--)
- SET_REGNO_REG_SET (live, regno + i);
}
return 0;
}