From: Richard Sandiford <richard.sandiford@arm.com>
To: Jeff Law <jlaw@ventanamicro.com>
Cc: "gcc-patches\@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Jivan Hakobyan <jivanhakobyan9@gmail.com>
Subject: Re: [RFA] New pass for sign/zero extension elimination
Date: Mon, 27 Nov 2023 20:15:19 +0000 [thread overview]
Message-ID: <mptv89nt0ko.fsf@arm.com> (raw)
In-Reply-To: <929d7ab8-7ca2-4cd7-a68b-1a24862c7077@ventanamicro.com> (Jeff Law's message of "Wed, 22 Nov 2023 10:59:04 -0700")
[Sorry for the slow response]
Jeff Law <jlaw@ventanamicro.com> writes:
> On 11/20/23 11:26, Richard Sandiford wrote:
>>
>> scalar_int_mode outer_mode;
>> if (!is_a<scalar_int_mode> (GET_MODE (x), &outer_mode)
>> || GET_MODE_BITSIZE (outer_mode) > 64)
>> continue;
> Wouldn't we also want to verify that the size is constant, or is it the
> case that all the variable cases are vector (and would we want to
> actually depend on that)?
Yeah, all the variable cases are vectors. We don't support variable-length
scalars at the moment. (And I hope that never changes. :))
>>> + /* We will handle the other operand of a binary operator
>>> + at the bottom of the loop by resetting Y. */
>>> + if (BINARY_P (src))
>>> + y = XEXP (src, 0);
>>
>> What about UNARY_P, given that NOT is included in the codes above?
> We'll break that inner for(;;) then iterate into the subobject, marking
> the relevant bits live. FWIW, the control flow of this code continues
> to be my biggest concern from a maintenance standpoint. Figuring it out
> was a major pain and I've tried to document what is and what is not
> safe. But it's still painful to walk through.
>
> I pondered if note_uses/note_stores would be better, but concluded we'd
> just end up with a ton of state objects to carry around and reasoning
> about that would be just as hard.
Feels like it would be good to handle the top-level structure explicitly,
(PARALLELs, SETs, SET_SRCs, etc.), then fall back to iteration at the
point that we can no longer do better then "all registers in this expression
are fully live".
If we do that, rtx_properties might be an alternative to explicit
iteration. The advantage of that is that it can handle destination
and sources as the top-level expression, and records whether each
register is itself a destination or source.
Thanks,
Richard
next prev parent reply other threads:[~2023-11-27 20:15 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 0:47 Jeff Law
2023-11-20 1:22 ` Oleg Endo
2023-11-20 2:51 ` Jeff Law
2023-11-20 2:57 ` Oleg Endo
2023-11-20 2:23 ` Xi Ruoyao
2023-11-20 2:46 ` Jeff Law
2023-11-20 2:52 ` Jeff Law
2023-11-20 3:32 ` Xi Ruoyao
2023-11-20 3:48 ` Jeff Law
2023-11-20 18:26 ` Richard Sandiford
2023-11-22 17:59 ` Jeff Law
2023-11-27 20:15 ` Richard Sandiford [this message]
2023-11-20 18:56 ` Dimitar Dimitrov
2023-11-22 22:23 ` Jeff Law
2023-11-26 16:42 ` rep.dot.nop
2023-11-27 16:14 ` Jeff Law
2023-11-27 11:30 ` Andrew Stubbs
2023-11-27 16:16 ` Jeff Law
2023-12-01 1:08 ` Hans-Peter Nilsson
2023-12-01 15:09 ` Jeff Law
2023-12-01 16:17 ` Hans-Peter Nilsson
2023-11-27 17:36 Joern Rennecke
2023-11-27 17:57 ` Joern Rennecke
2023-11-27 20:03 ` Richard Sandiford
2023-11-27 20:18 ` Jeff Law
2023-11-28 13:36 ` Joern Rennecke
2023-11-28 14:09 ` Joern Rennecke
2023-11-30 17:33 ` Jeff Law
2023-11-28 13:13 ` Joern Rennecke
2023-11-28 5:50 ` Jeff Law
2023-11-27 18:19 Joern Rennecke
2023-11-28 5:51 ` Jeff Law
2023-11-29 17:37 Joern Rennecke
2023-11-29 19:13 ` Jivan Hakobyan
2023-11-30 15:37 ` Jeff Law
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=mptv89nt0ko.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jivanhakobyan9@gmail.com \
--cc=jlaw@ventanamicro.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).