public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4899] xtensa: Clean up xtensa_expand_prologue
@ 2022-12-27 15:39 Max Filippov
  0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2022-12-27 15:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b22f86ba9582b1483ff970aa73740864ceaa0860

commit r13-4899-gb22f86ba9582b1483ff970aa73740864ceaa0860
Author: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Date:   Tue Dec 27 15:30:12 2022 +0900

    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.

Diff:
---
 gcc/config/xtensa/xtensa.cc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index 178d16a7846..709b0d52d06 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-27 15:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 15:39 [gcc r13-4899] xtensa: Clean up xtensa_expand_prologue Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).