aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1995-02-13 11:00:20 -0800
committerJim Wilson <wilson@gcc.gnu.org>1995-02-13 11:00:20 -0800
commit4079cd635ee112a038e5f5af23ca335ca3d43d49 (patch)
tree50051f26983489e1a3c1127fcafc86abdb0c7c7b
parenta4c80850bc9444e603fbbf725ee7f69d5f293aa7 (diff)
downloadgcc-4079cd635ee112a038e5f5af23ca335ca3d43d49.zip
gcc-4079cd635ee112a038e5f5af23ca335ca3d43d49.tar.gz
gcc-4079cd635ee112a038e5f5af23ca335ca3d43d49.tar.bz2
(last_spill_reg): Move definition to top of file.
Don't initialize here. (reload): Intialize here to -1. From-SVN: r8930
-rw-r--r--gcc/reload1.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 1db7cd3..7b9aa97 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -168,6 +168,11 @@ static HARD_REG_SET bad_spill_regs;
elements that are actually valid; new ones are added at the end. */
static short spill_regs[FIRST_PSEUDO_REGISTER];
+/* Index of last register assigned as a spill register. We allocate in
+ a round-robin fashion. */
+
+static int last_spill_reg;
+
/* Describes order of preference for putting regs into spill_regs.
Contains the numbers of all the hard regs, in order most preferred first.
This order is different for each function.
@@ -691,6 +696,9 @@ reload (first, global, dumpfile)
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
spill_reg_order[i] = -1;
+ /* Initialize to -1, which means take the first spill register. */
+ last_spill_reg = -1;
+
/* On most machines, we can't use any register explicitly used in the
rtl as a spill register. But on some, we have to. Those will have
taken care to keep the life of hard regs as short as possible. */
@@ -4686,11 +4694,6 @@ rtx reload_override_in[MAX_RELOADS];
or -1 if we did not need one of the spill registers for this reload. */
int reload_spill_index[MAX_RELOADS];
-/* Index of last register assigned as a spill register. We allocate in
- a round-robin fashio. */
-
-static int last_spill_reg = 0;
-
/* Find a spill register to use as a reload register for reload R.
LAST_RELOAD is non-zero if this is the last reload for the insn being
processed.