From: Po-Chun Chang Date: Mon, 8 Jul 2013 09:05:38 +0000 (+0000) Subject: re PR rtl-optimization/57786 (wasted work in distribute_notes) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75fefa91634deb3b00ee0b06cc07c35ceca7e491;p=gcc.git re PR rtl-optimization/57786 (wasted work in distribute_notes) PR rtl-optimization/57786 * combine.c (distribute_notes) : Change all_used to bool and break out of the loop when it is set to false. From-SVN: r200776 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4fc4e503dc7..ef789cacd66 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-07-08 Po-Chun Chang + + PR rtl-optimization/57786 + * combine.c (distribute_notes) : Change all_used to bool + and break out of the loop when it is set to false. + 2013-07-08 Jakub Jelinek PR target/57819 diff --git a/gcc/combine.c b/gcc/combine.c index ca311ff7797..fc94c68626c 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;