diff options
author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2022-12-27 15:30:12 +0900 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2022-12-27 07:38:38 -0800 |
commit | b22f86ba9582b1483ff970aa73740864ceaa0860 (patch) | |
tree | 591657f2b5ae4576208ffae2e5c8c614e050abb7 /gcc/config | |
parent | 89d5982b8f92c7441e34f8b65466840b4fe43687 (diff) | |
download | gcc-b22f86ba9582b1483ff970aa73740864ceaa0860.zip gcc-b22f86ba9582b1483ff970aa73740864ceaa0860.tar.gz gcc-b22f86ba9582b1483ff970aa73740864ceaa0860.tar.bz2 |
xtensa: Clean up xtensa_expand_prologue
gcc/ChangeLog:
* config/xtensa/xtensa.cc (xtensa_expand_prologue): Modify to
exit the inspection loops as soon as the necessity of stack
pointer is found.
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/xtensa/xtensa.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc index 178d16a..709b0d5 100644 --- a/gcc/config/xtensa/xtensa.cc +++ b/gcc/config/xtensa/xtensa.cc @@ -3327,12 +3327,18 @@ xtensa_expand_prologue (void) ref; ref = DF_REF_NEXT_REG (ref)) if (DF_REF_CLASS (ref) == DF_REF_REGULAR && NONJUMP_INSN_P (DF_REF_INSN (ref))) - stack_pointer_needed = true; + { + stack_pointer_needed = true; + break; + } /* Check if callee-saved registers really need saving to the stack. */ if (!stack_pointer_needed) for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno) if (xtensa_call_save_reg (regno)) - stack_pointer_needed = true; + { + stack_pointer_needed = true; + break; + } cfun->machine->inhibit_logues_a1_adjusts = !stack_pointer_needed; |