From: Max Filippov <jcmvbkbc@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Subject: [COMMITTED 2/4] xtensa: Clean up xtensa_expand_prologue
Date: Tue, 27 Dec 2022 07:44:02 -0800 [thread overview]
Message-ID: <20221227154404.111654-2-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <20221227154404.111654-1-jcmvbkbc@gmail.com>
From: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
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.
---
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 178d16a78462..709b0d52d069 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;
--
2.30.2
next prev parent reply other threads:[~2022-12-27 15:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-27 15:44 [COMMITTED 1/4] xtensa: Tabify, and trim trailing spaces Max Filippov
2022-12-27 15:44 ` Max Filippov [this message]
2022-12-27 15:44 ` [COMMITTED 3/4] xtensa: Change GP_RETURN{,_REG_COUNT} to GP_RETURN_{FIRST,LAST} Max Filippov
2022-12-27 15:44 ` [COMMITTED 4/4] xtensa: Generate density instructions in set_frame_ptr Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221227154404.111654-2-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jjsuwa_sys3175@yahoo.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).