public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: "Takayuki 'January June' Suwa" <jjsuwa_sys3175@yahoo.co.jp>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v2] xtensa: Optimize stack frame adjustment more
Date: Sat, 7 Jan 2023 12:23:54 -0800	[thread overview]
Message-ID: <CAMo8BfJFX+20L_DeQ9fqsPijoHSSsR_z3jyQtMBCEWQxAus4ow@mail.gmail.com> (raw)
In-Reply-To: <19010306-4056-6f84-e555-e744f4f5061e@yahoo.co.jp>

On Fri, Jan 6, 2023 at 6:55 PM Takayuki 'January June' Suwa
<jjsuwa_sys3175@yahoo.co.jp> wrote:
>
> This patch introduces a convenient helper function for integer immediate
> addition with scratch register as needed, that splits and emits either
> up to two ADDI/ADDMI machine instructions or an addition by register
> following an integer immediate load (which may later be transformed by
> constantsynth).
>
> By using the helper function, it makes stack frame adjustment logic
> simplified and instruction count less in some cases.
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.cc
>         (xtensa_split_imm_two_addends, xtensa_emit_add_imm):
>         New helper functions.
>         (xtensa_set_return_address, xtensa_output_mi_thunk):
>         Change to use the helper function.
>         (xtensa_emit_adjust_stack_ptr): Ditto.
>         And also change to try reusing the content of scratch register
>         A9 if the register is not modified in the function body.
> ---
>  gcc/config/xtensa/xtensa.cc | 151 +++++++++++++++++++++++++-----------
>  1 file changed, 106 insertions(+), 45 deletions(-)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.

-- 
Thanks.
-- Max

      reply	other threads:[~2023-01-07 20:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19010306-4056-6f84-e555-e744f4f5061e.ref@yahoo.co.jp>
2023-01-07  2:55 ` Takayuki 'January June' Suwa
2023-01-07 20:23   ` Max Filippov [this message]

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=CAMo8BfJFX+20L_DeQ9fqsPijoHSSsR_z3jyQtMBCEWQxAus4ow@mail.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).