aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorPo-Chun Chang <pchang9@cs.wisc.edu>2013-07-08 09:05:38 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-07-08 09:05:38 +0000
commit75fefa91634deb3b00ee0b06cc07c35ceca7e491 (patch)
tree8389a6f45bfaeef2c7b2bc3175de374662776200 /gcc/combine.c
parent8140c06592fe11cfb82c54f0dc467705381a8785 (diff)
downloadgcc-75fefa91634deb3b00ee0b06cc07c35ceca7e491.zip
gcc-75fefa91634deb3b00ee0b06cc07c35ceca7e491.tar.gz
gcc-75fefa91634deb3b00ee0b06cc07c35ceca7e491.tar.bz2
re PR rtl-optimization/57786 (wasted work in distribute_notes)
PR rtl-optimization/57786 * combine.c (distribute_notes) <case REG_DEAD>: Change all_used to bool and break out of the loop when it is set to false. From-SVN: r200776
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index ca311ff..fc94c68 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -13580,14 +13580,17 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
&& hard_regno_nregs[regno][GET_MODE (XEXP (note, 0))] > 1)
{
unsigned int endregno = END_HARD_REGNO (XEXP (note, 0));
- int all_used = 1;
+ bool all_used = true;
unsigned int i;
for (i = regno; i < endregno; i++)
if ((! refers_to_regno_p (i, i + 1, PATTERN (place), 0)
&& ! find_regno_fusage (place, USE, i))
|| dead_or_set_regno_p (place, i))
- all_used = 0;
+ {
+ all_used = false;
+ break;
+ }
if (! all_used)
{
@@ -13631,7 +13634,6 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
break;
}
}
-
}
place = 0;