public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@vrull.eu>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: gcc-patches@gcc.gnu.org,
	 Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
	Tamar Christina <Tamar.Christina@arm.com>,
	 Jakub Jelinek <jakub@gcc.gnu.org>,
	Richard Biener <rguenth@gcc.gnu.org>,
	 Sergei Trofimovich <slyfox@gcc.gnu.org>,
	Andrew Pinski <pinskia@gcc.gnu.org>,
	 Tobian Burnus <burnus@gcc.gnu.org>, Jeff Law <law@gcc.gnu.org>,
	Kito Cheng <kito.cheng@gmail.com>,
	 Manolis Tsamis <manolis.tsamis@vrull.eu>
Subject: Re: [PATCH] cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling
Date: Wed, 28 Jun 2023 07:10:27 -0700	[thread overview]
Message-ID: <CAAeLtUB1Wbtc5OSMLgnvOWbJc+Sz-4A9hfVvJ4mjjLZ1TW7Cuw@mail.gmail.com> (raw)
In-Reply-To: <a7fa1942-80f3-4156-a64f-ffab744174c6@gmail.com>

Thanks! Applied to master with the requested changes as
417b8379b32945d61f1ce3d8281bee063eea1937.
Note that the final version factors out the duplicated logic, so we
now have a single place to add the comments.

Philipp.


On Sun, 25 Jun 2023 at 06:09, Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
>
> On 6/22/23 05:11, Philipp Tomsich wrote:
> > From: Manolis Tsamis <manolis.tsamis@vrull.eu>
> >
> > Fixes: 6a2e8dcbbd4bab3
> >
> > Propagation for the stack pointer in regcprop was enabled in
> > 6a2e8dcbbd4bab3, but set ORIGINAL_REGNO/REG_ATTRS/REG_POINTER for
> > stack_pointer_rtx which caused regression (e.g., PR 110313, PR 110308).
> >
> > This fix adds special handling for stack_pointer_rtx in the places
> > where maybe_mode_change is called. This also adds an check in
> > maybe_mode_change to return the stack pointer only when the requested
> > mode matches the mode of stack_pointer_rtx.
> >
> >       PR 110308
> Should be
>         PR debug/110308
>
>
> >
> > gcc/ChangeLog:
> >
> >       * regcprop.cc (maybe_mode_change): Check stack_pointer_rtx mode.
> >       (find_oldest_value_reg): Special handling of stack_pointer_rtx.
> >       (copyprop_hardreg_forward_1): Ditto.
> >
> > gcc/testsuite/ChangeLog:
> >
> >       * g++.dg/torture/pr110308.C: New test.
> I don't doubt the need for the special handling of the stack pointer,
> but it's not obvious why it's needed.  So my request is that both humks
> which specialize handling of ORIGINAL_REGNO, REG_ATTRS & REG_POINTER
> have a comment indicating why we must not adjust those values when
> NEW_RTX is STACK_POINTER_RTX.
>
> OK with that change.
>
> Jeff

      reply	other threads:[~2023-06-28 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 11:11 Philipp Tomsich
2023-06-23  4:08 ` Andrew Pinski
2023-06-25 13:09 ` Jeff Law
2023-06-28 14:10   ` Philipp Tomsich [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=CAAeLtUB1Wbtc5OSMLgnvOWbJc+Sz-4A9hfVvJ4mjjLZ1TW7Cuw@mail.gmail.com \
    --to=philipp.tomsich@vrull.eu \
    --cc=Tamar.Christina@arm.com \
    --cc=burnus@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=law@gcc.gnu.org \
    --cc=manolis.tsamis@vrull.eu \
    --cc=pinskia@gcc.gnu.org \
    --cc=rguenth@gcc.gnu.org \
    --cc=slyfox@gcc.gnu.org \
    --cc=thiago.bauermann@linaro.org \
    /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).