public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vineet Gupta <vineetg@rivosinc.com>
To: Jeff Law <jeffreyalaw@gmail.com>, gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, Palmer Dabbelt <palmer@rivosinc.com>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Christoph Mullner <christoph.muellner@vrull.eu>,
	gnu-toolchain@rivosinc.com
Subject: Re: [PATCH] riscv: relax splitter restrictions for creating pseudos
Date: Tue, 18 Apr 2023 12:02:56 -0700	[thread overview]
Message-ID: <c11cf8f6-7d43-b637-8a4b-8b793d5f9495@rivosinc.com> (raw)
In-Reply-To: <680c7bbe-5d6e-07cd-8468-247afc65e1dd@gmail.com>



On 4/18/23 11:36, Jeff Law wrote:
>
>
> On 4/18/23 08:36, Vineet Gupta wrote:
>> [partial addressing of PR/109279]
>>
>> RISCV splitters have restrictions to not create pesudos due to a combine
>> limitatation. And despite this being a split-during-combine limitation,
>> all split passes take the hit due to way define*_split are used in gcc.
>>
>> With the original combine issue being fixed 61bee6aed2 ("combine: Don't
>> record for UNDO_MODE pointers into regno_reg_rtx array [PR104985]")
>> the RV splitters can now be relaxed.
>>
>> This improves the codegen in general. e.g.
>>
>>     long long f(void) { return 0x0101010101010101ull; }
>>
>> Before
>>
>>     li    a0,0x01010000
>>     addi    a0,0x0101
>>     slli    a0,a0,16
>>     addi    a0,a0,0x0101
>>     slli    a0,a0,16
>>     addi    a0,a0,0x0101
>>     ret
>>
>> With patch
>>
>>     li    a5,0x01010000
>>     addi    a5,a5,0x0101
>>     mv    a0,a5
>>     slli    a5,a5,32
>>     add    a0,a5,a0
>>     ret
>>
>> This is testsuite clean, no regression w/ patch.
>>
>>                 ========= Summary of gcc testsuite =========
>>                              | # of unexpected case / # of unique 
>> unexpected case
>>                              |          gcc |          g++ | gfortran |
>>   rv64imafdc/  lp64d/ medlow |    2 /     2 |    1 /     1 | 6 /     1 |
>>     rv64imac/   lp64/ medlow |    3 /     3 |    1 /     1 | 43 /     
>> 8 |
>>   rv32imafdc/ ilp32d/ medlow |    1 /     1 |    3 /     2 | 6 /     1 |
>>     rv32imac/  ilp32/ medlow |    1 /     1 |    3 /     2 | 43 /     
>> 8 |
>>
>> This came up as part of IRC chat on PR/109279 and was suggested by
>> Andrew Pinski.
>>
>> Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
>> ---
>>   gcc/config/riscv/riscv-protos.h |  4 +--
>>   gcc/config/riscv/riscv.cc       | 46 +++++++++++++--------------------
>>   gcc/config/riscv/riscv.md       |  8 +++---
>>   3 files changed, 24 insertions(+), 34 deletions(-)
> This looks fine, except that you don't have a ChangeLog.

Oops sorry, yeah realized that right after pressing send. I did post a 
v2 with the changelog.

> It also looks like you don't have write permissions in the repository 
> (not listed in the MAINTAINERS file).  We might as well fix the 
> latter. You can then add a ChangeLog and push this yourself.

That would be awesome. Thx.
>
> Start with this form:
>
> https://sourceware.org/cgi-bin/pdw/ps_form.cgi
>
> Go ahead and list me as approving your request.

Done.

Thx again.
-Vineet

  reply	other threads:[~2023-04-18 19:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 14:36 Vineet Gupta
2023-04-18 15:07 ` [PATCH v2] " Vineet Gupta
2023-04-18 18:36 ` [PATCH] " Jeff Law
2023-04-18 19:02   ` Vineet Gupta [this message]
2023-04-25 17:25   ` [Committed] " Vineet Gupta
2023-04-25 20:03     ` Jeff Law
2023-04-25 20:20       ` Vineet Gupta
2023-04-25 21:35         ` 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=c11cf8f6-7d43-b637-8a4b-8b793d5f9495@rivosinc.com \
    --to=vineetg@rivosinc.com \
    --cc=christoph.muellner@vrull.eu \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gnu-toolchain@rivosinc.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@rivosinc.com \
    --cc=philipp.tomsich@vrull.eu \
    /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).