* [PATCH][AARCH64]Use selected cpu's tuning when no tuning parameter is specified.
@ 2014-11-27 14:14 Renlin Li
2014-12-02 17:01 ` [PING] " Renlin Li
2014-12-04 10:27 ` Marcus Shawcroft
0 siblings, 2 replies; 5+ messages in thread
From: Renlin Li @ 2014-11-27 14:14 UTC (permalink / raw)
To: gcc-patches; +Cc: marcus Shawcroft, ramana Radhakrishnan
[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]
Hi all,
We have the following code in aarch64_override_options() function.
/* The selected cpu may be an architecture, so lookup tuning by core
ID. */
if (!selected_tune)
selected_tune = &all_cores[selected_cpu->core];
However, the logic here is not right any more according to our current
code. selected_cpu will never be an architecture at this point.
This patch will correct the behaviour and use selected_cpu's tuning
directly if selected_tune is still not decided at this point.
We have the following consequence after the change.
Previously we have the following tuning settings with the following
command line options:
-march=armv8-a --> selected_cpu = generic, aarch64_tune_params =
cortexa53_tunings
Nothing specified and selected_cpu == generic --> aarch64_tune_params =
cortexa53_tunings
After the change, we got something different:
-march=armv8-a --> selected_cpu = generic, aarch64_tune_params =
generic_tunings
Nothing specified and selected_cpu == generic --> aarch64_tune_params =
generic_tunings
All other configuration(-march, -mcpu, -mtune) combinations should be
unaffected.
aarch64-none-elf has been built and tested on the model, no issue.
Is it Okay for trunk?
gcc/ChangeLog:
2014-11-27 Renlin Li <Renlin.Li@arm.com>
* config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
selected_tune.
(aarch64_override_options): Use selected_cpu's tuning.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 3.patch --]
[-- Type: text/x-patch; name=3.patch, Size: 804 bytes --]
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 1809513..0a8c303 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6613,7 +6613,6 @@ aarch64_parse_cpu (void)
if (strlen (cpu->name) == len && strncmp (cpu->name, str, len) == 0)
{
selected_cpu = cpu;
- selected_tune = cpu;
aarch64_isa_flags = selected_cpu->flags;
if (ext != NULL)
@@ -6709,9 +6708,8 @@ aarch64_override_options (void)
gcc_assert (selected_cpu);
- /* The selected cpu may be an architecture, so lookup tuning by core ID. */
if (!selected_tune)
- selected_tune = &all_cores[selected_cpu->core];
+ selected_tune = selected_cpu;
aarch64_tune_flags = selected_tune->flags;
aarch64_tune = selected_tune->core;
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PING] [PATCH][AARCH64]Use selected cpu's tuning when no tuning parameter is specified.
2014-11-27 14:14 [PATCH][AARCH64]Use selected cpu's tuning when no tuning parameter is specified Renlin Li
@ 2014-12-02 17:01 ` Renlin Li
2014-12-04 10:27 ` Marcus Shawcroft
1 sibling, 0 replies; 5+ messages in thread
From: Renlin Li @ 2014-12-02 17:01 UTC (permalink / raw)
To: gcc-patches; +Cc: marcus Shawcroft, ramana Radhakrishnan
On 27/11/14 11:27, Renlin Li wrote:
> Hi all,
>
> We have the following code in aarch64_override_options() function.
>
> /* The selected cpu may be an architecture, so lookup tuning by core
> ID. */
> if (!selected_tune)
> selected_tune = &all_cores[selected_cpu->core];
>
> However, the logic here is not right any more according to our current
> code. selected_cpu will never be an architecture at this point.
>
> This patch will correct the behaviour and use selected_cpu's tuning
> directly if selected_tune is still not decided at this point.
>
>
> We have the following consequence after the change.
> Previously we have the following tuning settings with the following
> command line options:
> -march=armv8-a --> selected_cpu = generic, aarch64_tune_params =
> cortexa53_tunings
> Nothing specified and selected_cpu == generic --> aarch64_tune_params
> = cortexa53_tunings
>
> After the change, we got something different:
> -march=armv8-a --> selected_cpu = generic, aarch64_tune_params =
> generic_tunings
> Nothing specified and selected_cpu == generic --> aarch64_tune_params
> = generic_tunings
>
> All other configuration(-march, -mcpu, -mtune) combinations should be
> unaffected.
>
>
> aarch64-none-elf has been built and tested on the model, no issue.
>
> Is it Okay for trunk?
>
>
> gcc/ChangeLog:
>
> 2014-11-27 Renlin Li <Renlin.Li@arm.com>
>
> * config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
> selected_tune.
> (aarch64_override_options): Use selected_cpu's tuning.
>
>
PING~
Regards,
Renlin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AARCH64]Use selected cpu's tuning when no tuning parameter is specified.
2014-11-27 14:14 [PATCH][AARCH64]Use selected cpu's tuning when no tuning parameter is specified Renlin Li
2014-12-02 17:01 ` [PING] " Renlin Li
@ 2014-12-04 10:27 ` Marcus Shawcroft
2014-12-10 13:59 ` [PATCH][AARCH64][4.9]Backport "Use selected cpu's tuning when no tuning parameter is specified." Renlin Li
1 sibling, 1 reply; 5+ messages in thread
From: Marcus Shawcroft @ 2014-12-04 10:27 UTC (permalink / raw)
To: Renlin Li; +Cc: gcc-patches
On 27 November 2014 at 11:27, Renlin Li <renlin.li@arm.com> wrote:
> gcc/ChangeLog:
>
> 2014-11-27 Renlin Li <Renlin.Li@arm.com>
>
> * config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
> selected_tune.
> (aarch64_override_options): Use selected_cpu's tuning.
>
OK and this is also broken in 4.9, could you prepare a backport please. /Marcus
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH][AARCH64][4.9]Backport "Use selected cpu's tuning when no tuning parameter is specified."
2014-12-04 10:27 ` Marcus Shawcroft
@ 2014-12-10 13:59 ` Renlin Li
2014-12-11 15:10 ` Marcus Shawcroft
0 siblings, 1 reply; 5+ messages in thread
From: Renlin Li @ 2014-12-10 13:59 UTC (permalink / raw)
To: Marcus Shawcroft; +Cc: gcc-patches, Ramana Radhakrishnan
[-- Attachment #1: Type: text/plain, Size: 900 bytes --]
On 04/12/14 10:27, Marcus Shawcroft wrote:
> On 27 November 2014 at 11:27, Renlin Li <renlin.li@arm.com> wrote:
>
>> gcc/ChangeLog:
>>
>> 2014-11-27 Renlin Li <Renlin.Li@arm.com>
>>
>> * config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
>> selected_tune.
>> (aarch64_override_options): Use selected_cpu's tuning.
>>
> OK and this is also broken in 4.9, could you prepare a backport please. /Marcus
>
This is a backport patch of
https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00287.html
aarch64-none-elf has been built and tested on the model, no issue.
Okay for branch 4.9?
Regards,
Renlin Li
gcc/ChangeLog:
2014-12-10 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64.c (aarch64_parse_cpu): Remove
selected_tune
assignment as this will be done later.
(aarch64_override_options): Use selected_cpu's tuning.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 3.patch --]
[-- Type: text/x-patch; name=3.patch, Size: 804 bytes --]
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 1809513..0a8c303 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6613,7 +6613,6 @@ aarch64_parse_cpu (void)
if (strlen (cpu->name) == len && strncmp (cpu->name, str, len) == 0)
{
selected_cpu = cpu;
- selected_tune = cpu;
aarch64_isa_flags = selected_cpu->flags;
if (ext != NULL)
@@ -6709,9 +6708,8 @@ aarch64_override_options (void)
gcc_assert (selected_cpu);
- /* The selected cpu may be an architecture, so lookup tuning by core ID. */
if (!selected_tune)
- selected_tune = &all_cores[selected_cpu->core];
+ selected_tune = selected_cpu;
aarch64_tune_flags = selected_tune->flags;
aarch64_tune = selected_tune->core;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AARCH64][4.9]Backport "Use selected cpu's tuning when no tuning parameter is specified."
2014-12-10 13:59 ` [PATCH][AARCH64][4.9]Backport "Use selected cpu's tuning when no tuning parameter is specified." Renlin Li
@ 2014-12-11 15:10 ` Marcus Shawcroft
0 siblings, 0 replies; 5+ messages in thread
From: Marcus Shawcroft @ 2014-12-11 15:10 UTC (permalink / raw)
To: Renlin Li; +Cc: gcc-patches
On 10 December 2014 at 13:58, Renlin Li <renlin.li@arm.com> wrote:
> This is a backport patch of
> https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00287.html
>
> aarch64-none-elf has been built and tested on the model, no issue.
> Okay for branch 4.9?
>
> Regards,
> Renlin Li
>
>
> gcc/ChangeLog:
>
> 2014-12-10 Renlin Li <renlin.li@arm.com>
>
> * config/aarch64/aarch64.c (aarch64_parse_cpu): Remove selected_tune
> assignment as this will be done later.
> (aarch64_override_options): Use selected_cpu's tuning.
OK /Marcus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-11 15:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-27 14:14 [PATCH][AARCH64]Use selected cpu's tuning when no tuning parameter is specified Renlin Li
2014-12-02 17:01 ` [PING] " Renlin Li
2014-12-04 10:27 ` Marcus Shawcroft
2014-12-10 13:59 ` [PATCH][AARCH64][4.9]Backport "Use selected cpu's tuning when no tuning parameter is specified." Renlin Li
2014-12-11 15:10 ` Marcus Shawcroft
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).