* Re: [PATCH] Turn on LRA on all targets
@ 2023-04-29 13:37 Roger Sayle
2023-04-29 15:06 ` Jeff Law
0 siblings, 1 reply; 3+ messages in thread
From: Roger Sayle @ 2023-04-29 13:37 UTC (permalink / raw)
To: 'GCC Patches'
Cc: 'Segher Boessenkool', 'Tom de Vries'
Segher Boessenkool wrote:
> I send this patch now so that people can start testing.
>
> diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
> index 89349dae9e62..e32f17377525 100644
> --- a/gcc/config/nvptx/nvptx.cc
> +++ b/gcc/config/nvptx/nvptx.cc
> @@ -7601,9 +7601,6 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree
name, tree value)
> #undef TARGET_ATTRIBUTE_TABLE
> #define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table
>
>-#undef TARGET_LRA_P
>-#define TARGET_LRA_P hook_bool_void_false
>-
> #undef TARGET_LEGITIMATE_ADDRESS_P
> #define TARGET_LEGITIMATE_ADDRESS_P nvptx_legitimate_address_p
I've tested Segher's patch on nvptx-none with make and make -k check and
can confirm there are no new regressions. Nvptx is unique in that it
doesn't
use register allocation, i.e. GCC's only TARGET_NO_REGISTER_ALLOCATION
target,
so it's a little odd that it specifies which register allocator it doesn't
use.
I hope this helps,
Roger
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Turn on LRA on all targets
2023-04-29 13:37 [PATCH] Turn on LRA on all targets Roger Sayle
@ 2023-04-29 15:06 ` Jeff Law
2023-06-30 7:11 ` Flip the nvptx port to LRA (was: [PATCH] Turn on LRA on all targets) Thomas Schwinge
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2023-04-29 15:06 UTC (permalink / raw)
To: Roger Sayle, 'GCC Patches'
Cc: 'Segher Boessenkool', 'Tom de Vries'
On 4/29/23 07:37, Roger Sayle wrote:
>
> Segher Boessenkool wrote:
>> I send this patch now so that people can start testing.
>>
>> diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
>> index 89349dae9e62..e32f17377525 100644
>> --- a/gcc/config/nvptx/nvptx.cc
>> +++ b/gcc/config/nvptx/nvptx.cc
>> @@ -7601,9 +7601,6 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree
> name, tree value)
>> #undef TARGET_ATTRIBUTE_TABLE
>> #define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table
>>
>> -#undef TARGET_LRA_P
>> -#define TARGET_LRA_P hook_bool_void_false
>> -
>> #undef TARGET_LEGITIMATE_ADDRESS_P
>> #define TARGET_LEGITIMATE_ADDRESS_P nvptx_legitimate_address_p
>
>
> I've tested Segher's patch on nvptx-none with make and make -k check and
> can confirm there are no new regressions. Nvptx is unique in that it
> doesn't
> use register allocation, i.e. GCC's only TARGET_NO_REGISTER_ALLOCATION
> target,
> so it's a little odd that it specifies which register allocator it doesn't
> use.
>
> I hope this helps,
It does. Consider a patch which flips the nvptx port to LRA as
pre-approved.
I tried the FRV just for fun. It faulted all over the place :(
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Flip the nvptx port to LRA (was: [PATCH] Turn on LRA on all targets)
2023-04-29 15:06 ` Jeff Law
@ 2023-06-30 7:11 ` Thomas Schwinge
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Schwinge @ 2023-06-30 7:11 UTC (permalink / raw)
To: Jeff Law, Roger Sayle, gcc-patches, Segher Boessenkool; +Cc: Tom de Vries
[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]
Hi!
On 2023-04-29T09:06:54-0600, Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> On 4/29/23 07:37, Roger Sayle wrote:
>>
>> Segher Boessenkool wrote:
>>> I send this patch now so that people can start testing.
>>>
>>> --- a/gcc/config/nvptx/nvptx.cc
>>> +++ b/gcc/config/nvptx/nvptx.cc
>>> @@ -7601,9 +7601,6 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name, tree value)
>>> #undef TARGET_ATTRIBUTE_TABLE
>>> #define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table
>>>
>>> -#undef TARGET_LRA_P
>>> -#define TARGET_LRA_P hook_bool_void_false
>>> -
>>> #undef TARGET_LEGITIMATE_ADDRESS_P
>>> #define TARGET_LEGITIMATE_ADDRESS_P nvptx_legitimate_address_p
>>
>> I've tested Segher's patch on nvptx-none with make and make -k check and
>> can confirm there are no new regressions.
Confirmed. Also, no change in nvptx target libraries built. As
expected.
>> Nvptx is unique in that it
>> doesn't
>> use register allocation, i.e. GCC's only TARGET_NO_REGISTER_ALLOCATION
>> target,
>> so it's a little odd that it specifies which register allocator it doesn't
>> use.
>>
>> I hope this helps,
>
> It does. Consider a patch which flips the nvptx port to LRA as
> pre-approved.
Pushed to master branch commit f7e3123638712773e8c01e17aae9dc64d9342016
"Flip the nvptx port to LRA", see attached.
Grüße
Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Flip-the-nvptx-port-to-LRA.patch --]
[-- Type: text/x-diff, Size: 1080 bytes --]
From f7e3123638712773e8c01e17aae9dc64d9342016 Mon Sep 17 00:00:00 2001
From: Segher Boessenkool <segher@kernel.crashing.org>
Date: Sun, 23 Apr 2023 16:47:52 +0000
Subject: [PATCH] Flip the nvptx port to LRA
... understanding that "turn on LRA" is an exaggeration here, given that nvptx
isn't actually doing register allocation ('TARGET_NO_REGISTER_ALLOCATION').
gcc/
* config/nvptx/nvptx.cc (TARGET_LRA_P): Remove.
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
---
gcc/config/nvptx/nvptx.cc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
index e3b0304d5376..16ed78030d73 100644
--- a/gcc/config/nvptx/nvptx.cc
+++ b/gcc/config/nvptx/nvptx.cc
@@ -7633,9 +7633,6 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name, tree value)
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE nvptx_attribute_table
-#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_false
-
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P nvptx_legitimate_address_p
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-30 7:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-29 13:37 [PATCH] Turn on LRA on all targets Roger Sayle
2023-04-29 15:06 ` Jeff Law
2023-06-30 7:11 ` Flip the nvptx port to LRA (was: [PATCH] Turn on LRA on all targets) Thomas Schwinge
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).