From: Andrew Pinski Date: Fri, 2 Apr 2004 01:19:41 +0000 (+0000) Subject: rtlanal.c (find_reg_note): Manually unswitch the loop. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd798543d8045e0d51d7bdd53bec3012199a3a03;p=gcc.git rtlanal.c (find_reg_note): Manually unswitch the loop. 2004-04-01 Andrew Pinski * rtlanal.c (find_reg_note): Manually unswitch the loop. From-SVN: r80347 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eada5df2d2d..e2410c3d32f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-04-01 Andrew Pinski + + * rtlanal.c (find_reg_note): Manually + unswitch the loop. + 2004-04-01 Mark Mitchell * genemit.c (gen_split): Change prototype of generated code. diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 3f3a4289d63..c66cc9adc8c 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1911,10 +1911,16 @@ find_reg_note (rtx insn, enum reg_note kind, rtx datum) /* Ignore anything that is not an INSN, JUMP_INSN or CALL_INSN. */ if (! INSN_P (insn)) return 0; + if (datum == 0) + { + for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) + if (REG_NOTE_KIND (link) == kind) + return link; + return 0; + } for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) - if (REG_NOTE_KIND (link) == kind - && (datum == 0 || datum == XEXP (link, 0))) + if (REG_NOTE_KIND (link) == kind && datum == XEXP (link, 0)) return link; return 0; }