diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-09-10 01:03:02 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-09-09 19:03:02 -0600 |
commit | 8feb7351f8d66ccda98dec556b69d51f3d7aadb1 (patch) | |
tree | 04b5cc79c2157ea596f0752fa023d8245f787941 /gcc/reg-stack.c | |
parent | 0c6bac90e719e5d67595a9662c8ac20472eb4236 (diff) | |
download | gcc-8feb7351f8d66ccda98dec556b69d51f3d7aadb1.zip gcc-8feb7351f8d66ccda98dec556b69d51f3d7aadb1.tar.gz gcc-8feb7351f8d66ccda98dec556b69d51f3d7aadb1.tar.bz2 |
reg-stack.c (straighten_stack): Do nothing if the virtual stack is empty or has a single entry.
* reg-stack.c (straighten_stack): Do nothing if the virtual stack is
empty or has a single entry.
From-SVN: r22376
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index ab400c5..a7a5fb7 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -309,6 +309,13 @@ straighten_stack (insn, regstack) struct stack_def temp_stack; int top; + /* If there is only a single register on the stack, then the stack is + already in increasing order and no reorganization is needed. + + Similarly if the stack is empty. */ + if (regstack->top <= 0) + return; + temp_stack.reg_set = regstack->reg_set; for (top = temp_stack.top = regstack->top; top >= 0; top--) |