From: Richard Sandiford Date: Sun, 20 Jan 2008 08:47:14 +0000 (+0000) Subject: global.c (find_reg): Only compute EH_RETURN_DATA_REGNO once per input. X-Git-Tag: releases/gcc-4.3.0~517 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ecff8c1c5d2542c055f3ec12c58d94221e1745ec;p=thirdparty%2Fgcc.git global.c (find_reg): Only compute EH_RETURN_DATA_REGNO once per input. gcc/ * global.c (find_reg): Only compute EH_RETURN_DATA_REGNO once per input. From-SVN: r131676 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28a4a5499731..4a327d48025c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-01-20 Richard Sandiford + + * global.c (find_reg): Only compute EH_RETURN_DATA_REGNO once per + input. + 2008-01-19 Kenneth Zadeck PR rtl-optimization/26854 diff --git a/gcc/global.c b/gcc/global.c index c805f572c7fe..b8a0ec781585 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -1016,8 +1016,13 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere if (allocno[num].no_eh_reg) { unsigned int j; - for (j = 0; EH_RETURN_DATA_REGNO (j) != INVALID_REGNUM; j++) - SET_HARD_REG_BIT (used1, EH_RETURN_DATA_REGNO (j)); + for (j = 0; ; ++j) + { + unsigned int regno = EH_RETURN_DATA_REGNO (j); + if (regno == INVALID_REGNUM) + break; + SET_HARD_REG_BIT (used1, regno); + } } #endif