public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: jlaw@ventanamicro.com
Cc: manolis.tsamis@vrull.eu, Vineet Gupta <vineetg@rivosinc.com>,
	gcc-patches@gcc.gnu.org, Kito Cheng <kito.cheng@gmail.com>,
	philipp.tomsich@vrull.eu
Subject: Re: [PATCH] Enable shrink wrapping for the RISC-V target.
Date: Wed, 02 Nov 2022 17:26:19 -0700 (PDT)	[thread overview]
Message-ID: <mhng-f36dfb20-48b9-4390-8c1b-8f25b0faa1da@palmer-ri-x1c9a> (raw)
In-Reply-To: <4afcf3c0-690c-1168-b5e2-b6542b85d8e9@ventanamicro.com>

On Wed, 02 Nov 2022 08:06:36 PDT (-0700), jlaw@ventanamicro.com wrote:
>
> On 11/2/22 07:54, Manolis Tsamis wrote:
>>
>> I've revisited this testcase and I think it's not possible to make it
>> work with the current implementation.
>> It's not possible to trigger shrink wrapping in this case since the
>> wrapping of registers is guarded by
>>   if (SMALL_OPERAND (offset)) { bitmap_set_bit (components, regno); }
>> Hence if a long stack is generated we get no shrink wrapping.

Ah, sorry, I must have just missed that when reading the code.  In that 
case we're essentailly just doing what the other port was, so we're 
safe.

>> I also tried to remove that restriction but it looks like it can't
>> work because we can't create
>> pseudo-registers during shrink wrapping and shrink wrapping can't work either.
>>
>> I believe this means that shrink wrapping cannot interfere with a long
>> stack frame
>> so there is nothing to test against in this case?
>
> It'd be marginally better to have such a test case to ensure we don't
> shrink wrap it -- that would ensure that someone doesn't accidentally
> introduce shrink wrapping with large offsets.   Just a bit of future
> proofing.

If there's passing test cases that fail with that check removed then 
it's probably good enough, though I think in this case just having a 
comment there saying why the short-stack check is necessary should be 
fine.

  reply	other threads:[~2022-11-03  0:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 10:39 mtsamis
2022-10-02 20:32 ` Palmer Dabbelt
2022-10-18 15:18   ` Manolis Tsamis
2022-10-18 15:57     ` Jeff Law
2022-10-18 17:35       ` Palmer Dabbelt
2022-10-19 17:15         ` Jeff Law
2022-10-20  7:42           ` Manolis Tsamis
2022-11-02 14:12           ` Manolis Tsamis
2022-11-02 15:02             ` Jeff Law
2022-10-20  7:35         ` Manolis Tsamis
2022-11-02 13:54         ` Manolis Tsamis
2022-11-02 15:06           ` Jeff Law
2022-11-03  0:26             ` Palmer Dabbelt [this message]
2022-11-03 22:23               ` Jeff Law
2022-11-07 22:07                 ` Palmer Dabbelt
2022-11-13  1:32                   ` Jeff Law
2022-11-16 10:26                     ` Manolis Tsamis
2022-11-17  2:09                       ` Jeff Law
2022-11-17 10:54                         ` Manolis Tsamis
2022-11-17 11:59                           ` Philipp Tomsich

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=mhng-f36dfb20-48b9-4390-8c1b-8f25b0faa1da@palmer-ri-x1c9a \
    --to=palmer@dabbelt.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jlaw@ventanamicro.com \
    --cc=kito.cheng@gmail.com \
    --cc=manolis.tsamis@vrull.eu \
    --cc=philipp.tomsich@vrull.eu \
    --cc=vineetg@rivosinc.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).