From: nickc Date: Wed, 10 May 2000 22:29:27 +0000 (+0000) Subject: Do not bias REG_N_REFS by loop_depth when optimising for size. X-Git-Tag: upstream/4.9.2~101514 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8786901f197a646365a161daae3e1f048860aa8c;p=platform%2Fupstream%2Flinaro-gcc.git Do not bias REG_N_REFS by loop_depth when optimising for size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33833 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a942946..3bb68a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2000-05-10 Nick Clifton + + * flow.c (find_auto_inc): Do not bias REG_N_REFS by loop_depth + when optimising for size. + (mark_used_regs:) Ditto. + (try_pre_increment_1): Ditto. + 2000-05-10 Zack Weinberg * cppexp.c (lex): Use %.*s to print non-NUL-terminated string. diff --git a/gcc/flow.c b/gcc/flow.c index e20e4b2..1bea9c2 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -4854,7 +4854,8 @@ find_auto_inc (pbi, x, insn) /* Count an extra reference to the reg. When a reg is incremented, spilling it is worse, so we want to make that less likely. */ - REG_N_REFS (regno) += pbi->bb->loop_depth + 1; + REG_N_REFS (regno) += (optimize_size ? 1 + : pbi->bb->loop_depth + 1); /* Count the increment as a setting of the register, even though it isn't a SET in rtl. */ @@ -4935,7 +4936,8 @@ mark_used_reg (pbi, reg, cond, insn) REG_BASIC_BLOCK (regno) = REG_BLOCK_GLOBAL; /* Count (weighted) number of uses of each reg. */ - REG_N_REFS (regno) += pbi->bb->loop_depth + 1; + REG_N_REFS (regno) += (optimize_size ? 1 + : pbi->bb->loop_depth + 1); } } @@ -5353,7 +5355,8 @@ try_pre_increment_1 (pbi, insn) less likely. */ if (regno >= FIRST_PSEUDO_REGISTER) { - REG_N_REFS (regno) += pbi->bb->loop_depth + 1; + REG_N_REFS (regno) += (optimize_size ? 1 + : pbi->bb->loop_depth + 1); REG_N_SETS (regno)++; } return 1;