public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Vladimir Makarov <vmakarov@redhat.com>,
	Jeff Law <jeffreyalaw@gmail.com>,
	Richard Sandiford <richard.sandiford@arm.com>,
	gcc-patches@gcc.gnu.org,
	Surya Kumari Jangala <jskumari@linux.ibm.com>,
	Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH] lra, v2: emit caller-save register spills before call insn [PR116028]
Date: Fri, 21 Mar 2025 17:45:03 +0100	[thread overview]
Message-ID: <Z92Xj+JW67Gr7wxj@tucnak> (raw)
In-Reply-To: <Z91i4oSOe2t9Wsu5@tucnak>

On Fri, Mar 21, 2025 at 02:00:18PM +0100, Jakub Jelinek wrote:
> I have some concerns:
> 1) I wonder if there is a guarantee that first_call_insn if non-NULL will be
>    always in between curr_insn and usage_insn when call_save_p; I'd hope
>    yes because if usage_insn is before first_call_insn in the ebb,
>    presumably it wouldn't need to find call save regs because the range
>    wouldn't cross any calls
> 2) I wonder whether it wouldn't be better instead of inserting the saves
>    before first_call_insn insert it at the start of the bb containing that
>    call (after labels of course); emitting it right before a call could
>    mislead code looking for argument slot initialization of the call

Note, if we'd insert after labels of the bb containing first_call_insn
rather than before first_call_insn, perhaps verification that 1) is
guaranteed could be done through a dominance check.  Except that ira.cc
seems to free_dominance_info (CDI_DOMINATORS) and nothing in lra* seems to
compute or do anything with CDI_DOMINATORS.  Any other way to find out
cheaply what bb is earlier and what bb later within the ebb?

	Jakub


  reply	other threads:[~2025-03-21 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 13:00 Jakub Jelinek
2025-03-21 16:45 ` Jakub Jelinek [this message]
2025-03-21 19:01 ` Vladimir Makarov

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=Z92Xj+JW67Gr7wxj@tucnak \
    --to=jakub@redhat.com \
    --cc=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=jskumari@linux.ibm.com \
    --cc=richard.sandiford@arm.com \
    --cc=vmakarov@redhat.com \
    /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).