aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-12-13 00:59:38 +0000
committerJeff Law <law@gcc.gnu.org>1998-12-12 17:59:38 -0700
commit213c4983301cafca0f6a45e0d4796fc38d25896f (patch)
tree6c128ab8626189788357d57002b58c1f70149579 /gcc/flow.c
parent867cbbbe72ca5023755298073104de13f53625af (diff)
downloadgcc-213c4983301cafca0f6a45e0d4796fc38d25896f.zip
gcc-213c4983301cafca0f6a45e0d4796fc38d25896f.tar.gz
gcc-213c4983301cafca0f6a45e0d4796fc38d25896f.tar.bz2
rtl.h (recompute_reg_usage): Add second argument.
* rtl.h (recompute_reg_usage): Add second argument. * flow.c (recompute_reg_usage): Likewise. * toplev.c (rest_of_compilation): Supply second argument to recompute_reg_usage. From-SVN: r24291
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index add9d12..0a47c0e 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -4267,12 +4267,18 @@ count_reg_references (x)
register allocators to prioritize pseudos for allocation to hard regs.
More accurate reference counts generally lead to better register allocation.
+ F is the first insn to be scanned.
+ LOOP_STEP denotes how much loop_depth should be incremented per
+ loop nesting level in order to increase the ref count more for references
+ in a loop.
+
It might be worthwhile to update REG_LIVE_LENGTH, REG_BASIC_BLOCK and
possibly other information which is used by the register allocators. */
void
-recompute_reg_usage (f)
+recompute_reg_usage (f, loop_step)
rtx f;
+ int loop_step;
{
rtx insn;
int i, max_reg;
@@ -4295,9 +4301,9 @@ recompute_reg_usage (f)
{
/* Look for loop boundaries. */
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END)
- loop_depth--;
+ loop_depth -= loop_step;
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG)
- loop_depth++;
+ loop_depth += loop_step;
/* If we have LOOP_DEPTH == 0, there has been a bookkeeping error.
Abort now rather than setting register status incorrectly. */