From 4079cd635ee112a038e5f5af23ca335ca3d43d49 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Mon, 13 Feb 1995 11:00:20 -0800 Subject: [PATCH] (last_spill_reg): Move definition to top of file. Don't initialize here. (reload): Intialize here to -1. From-SVN: r8930 --- gcc/reload1.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/reload1.c b/gcc/reload1.c index 1db7cd36e7c..7b9aa9753a4 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. -- 2.30.2