aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2011-03-19 17:33:45 +0000
committerAnatoly Sokolov <aesok@post.ru>2011-03-19 17:33:45 +0000
commit98cc070846f500019876d3215571429acff6c21a (patch)
tree65a46d02e15ddf767df696b9661692c68608064a /gcc/cfgcleanup.c
parent2afddd5e714ebddce925088e03d4a2a27a985f4c (diff)
* 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: https://gcc.gnu.org/svn/gcc/trunk@171183 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index aaa0ea5d232..266fda7f1aa 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -1,6 +1,6 @@
/* Control flow optimization code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
@@ -208,13 +208,11 @@ mark_effect (rtx exp, regset nonequal)
{
dest = XEXP (exp, 0);
regno = REGNO (dest);
- CLEAR_REGNO_REG_SET (nonequal, regno);
- if (regno < FIRST_PSEUDO_REGISTER)
- {
- int n = hard_regno_nregs[regno][GET_MODE (dest)];
- while (--n > 0)
- CLEAR_REGNO_REG_SET (nonequal, regno + n);
- }
+ if (HARD_REGISTER_NUM_P (regno))
+ bitmap_clear_range (nonequal, regno,
+ hard_regno_nregs[regno][GET_MODE (dest)]);
+ else
+ bitmap_clear_bit (nonequal, regno);
}
return false;
@@ -227,13 +225,11 @@ mark_effect (rtx exp, regset nonequal)
if (!REG_P (dest))
return true;
regno = REGNO (dest);
- SET_REGNO_REG_SET (nonequal, regno);
- if (regno < FIRST_PSEUDO_REGISTER)
- {
- int n = hard_regno_nregs[regno][GET_MODE (dest)];
- while (--n > 0)
- SET_REGNO_REG_SET (nonequal, regno + n);
- }
+ if (HARD_REGISTER_NUM_P (regno))
+ bitmap_set_range (nonequal, regno,
+ hard_regno_nregs[regno][GET_MODE (dest)]);
+ else
+ bitmap_set_bit (nonequal, regno);
return false;
default: