* [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
@ 2023-04-18 12:17 Xi Ruoyao
2023-04-18 12:39 ` WANG Xuerui
2023-04-18 13:06 ` Lulu Cheng
0 siblings, 2 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-04-18 12:17 UTC (permalink / raw)
To: gcc-patches; +Cc: Lulu Cheng, WANG Xuerui, Chenghua Xu, Xi Ruoyao
According to Xuerui's LLVM changeset [1], doing so can make a
significant performace gain.
Bootstrapped and regtested on loongarch64-linux-gnu. Ok for GCC 14?
[1]:https://reviews.llvm.org/D148622
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_option_override_internal): If -falign-functions is
used but the alignment is not explicitly specified, set it to
4 * loongarch_issue_rate (). Likewise for -falign-loops.
---
gcc/config/loongarch/loongarch.cc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index 06fc1cd0604..6552484de7c 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -6236,6 +6236,17 @@ loongarch_option_override_internal (struct gcc_options *opts)
&& !opts->x_optimize_size)
opts->x_flag_prefetch_loop_arrays = 1;
+ /* Align functions and loops to (issue rate) * (insn size) to improve
+ the throughput of the fetching units. */
+ char *align = XNEWVEC (char, 16);
+ sprintf (align, "%d", loongarch_issue_rate () * 4);
+
+ if (opts->x_flag_align_functions && !opts->x_str_align_functions)
+ opts->x_str_align_functions = align;
+
+ if (opts->x_flag_align_loops && !opts->x_str_align_loops)
+ opts->x_str_align_loops = align;
+
if (TARGET_DIRECT_EXTERN_ACCESS && flag_shlib)
error ("%qs cannot be used for compiling a shared library",
"-mdirect-extern-access");
--
2.40.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-04-18 12:17 [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops Xi Ruoyao
@ 2023-04-18 12:39 ` WANG Xuerui
2023-04-18 12:45 ` Xi Ruoyao
2023-04-18 13:06 ` Lulu Cheng
1 sibling, 1 reply; 11+ messages in thread
From: WANG Xuerui @ 2023-04-18 12:39 UTC (permalink / raw)
To: Xi Ruoyao, gcc-patches; +Cc: Lulu Cheng, Chenghua Xu
Hi,
Thanks for helping confirming on GCC and porting this! I'd never know
even GCC lacked this adaptation without someone actually checking... Too
many things are taken for granted these days.
On 2023/4/18 20:17, Xi Ruoyao wrote:
> According to Xuerui's LLVM changeset [1], doing so can make a
> significant performace gain.
>
> Bootstrapped and regtested on loongarch64-linux-gnu. Ok for GCC 14?
>
> [1]:https://reviews.llvm.org/D148622
>
> gcc/ChangeLog:
>
> * config/loongarch/loongarch.cc
> (loongarch_option_override_internal): If -falign-functions is
> used but the alignment is not explicitly specified, set it to
> 4 * loongarch_issue_rate (). Likewise for -falign-loops.
> ---
> gcc/config/loongarch/loongarch.cc | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
> index 06fc1cd0604..6552484de7c 100644
> --- a/gcc/config/loongarch/loongarch.cc
> +++ b/gcc/config/loongarch/loongarch.cc
> @@ -6236,6 +6236,17 @@ loongarch_option_override_internal (struct gcc_options *opts)
> && !opts->x_optimize_size)
> opts->x_flag_prefetch_loop_arrays = 1;
>
> + /* Align functions and loops to (issue rate) * (insn size) to improve
> + the throughput of the fetching units. */
What about gating all of these on !opts->x_optimize_size, similar to
what aarch64 does?
> + char *align = XNEWVEC (char, 16);
> + sprintf (align, "%d", loongarch_issue_rate () * 4);
> +
> + if (opts->x_flag_align_functions && !opts->x_str_align_functions)
> + opts->x_str_align_functions = align;
> +
> + if (opts->x_flag_align_loops && !opts->x_str_align_loops)
> + opts->x_str_align_loops = align;
> +
> if (TARGET_DIRECT_EXTERN_ACCESS && flag_shlib)
> error ("%qs cannot be used for compiling a shared library",
> "-mdirect-extern-access");
Otherwise LGTM, thanks!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-04-18 12:39 ` WANG Xuerui
@ 2023-04-18 12:45 ` Xi Ruoyao
2023-04-18 12:51 ` WANG Xuerui
0 siblings, 1 reply; 11+ messages in thread
From: Xi Ruoyao @ 2023-04-18 12:45 UTC (permalink / raw)
To: WANG Xuerui, gcc-patches; +Cc: Lulu Cheng, Chenghua Xu
On Tue, 2023-04-18 at 20:39 +0800, WANG Xuerui wrote:
> Hi,
>
> Thanks for helping confirming on GCC and porting this! I'd never know
> even GCC lacked this adaptation without someone actually checking... Too
> many things are taken for granted these days.
>
> On 2023/4/18 20:17, Xi Ruoyao wrote:
> > According to Xuerui's LLVM changeset [1], doing so can make a
> > significant performace gain.
> >
> > Bootstrapped and regtested on loongarch64-linux-gnu. Ok for GCC 14?
> >
> > [1]:https://reviews.llvm.org/D148622
> >
> > gcc/ChangeLog:
> >
> > * config/loongarch/loongarch.cc
> > (loongarch_option_override_internal): If -falign-functions is
> > used but the alignment is not explicitly specified, set it to
> > 4 * loongarch_issue_rate (). Likewise for -falign-loops.
> > ---
> > gcc/config/loongarch/loongarch.cc | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
> > index 06fc1cd0604..6552484de7c 100644
> > --- a/gcc/config/loongarch/loongarch.cc
> > +++ b/gcc/config/loongarch/loongarch.cc
> > @@ -6236,6 +6236,17 @@ loongarch_option_override_internal (struct gcc_options *opts)
> > && !opts->x_optimize_size)
> > opts->x_flag_prefetch_loop_arrays = 1;
> >
> > + /* Align functions and loops to (issue rate) * (insn size) to improve
> > + the throughput of the fetching units. */
> What about gating all of these on !opts->x_optimize_size, similar to
> what aarch64 does?
opts->x_flag_align_functions and opts->x_flag_align_loops are only set
with -O2 or above unless the user manually uses -falign-functions or -
falign-loops. If the user uses "-Os -falign-functions" as CFLAGS I'd
assume s(he) wants to optimize for size but keep the optimized function
alignment.
> > + char *align = XNEWVEC (char, 16);
> > + sprintf (align, "%d", loongarch_issue_rate () * 4);
> > +
> > + if (opts->x_flag_align_functions && !opts->x_str_align_functions)
> > + opts->x_str_align_functions = align;
> > +
> > + if (opts->x_flag_align_loops && !opts->x_str_align_loops)
> > + opts->x_str_align_loops = align;
> > +
> > if (TARGET_DIRECT_EXTERN_ACCESS && flag_shlib)
> > error ("%qs cannot be used for compiling a shared library",
> > "-mdirect-extern-access");
> Otherwise LGTM, thanks!
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-04-18 12:45 ` Xi Ruoyao
@ 2023-04-18 12:51 ` WANG Xuerui
2023-04-18 13:00 ` Xi Ruoyao
0 siblings, 1 reply; 11+ messages in thread
From: WANG Xuerui @ 2023-04-18 12:51 UTC (permalink / raw)
To: Xi Ruoyao, gcc-patches; +Cc: Lulu Cheng, Chenghua Xu
On 2023/4/18 20:45, Xi Ruoyao wrote:
> On Tue, 2023-04-18 at 20:39 +0800, WANG Xuerui wrote:
>> Hi,
>>
>> Thanks for helping confirming on GCC and porting this! I'd never know
>> even GCC lacked this adaptation without someone actually checking... Too
>> many things are taken for granted these days.
>>
>> On 2023/4/18 20:17, Xi Ruoyao wrote:
>>> According to Xuerui's LLVM changeset [1], doing so can make a
>>> significant performace gain.
"doing so can gain significant performance" or "significant performance
can be gained by ..."?
Also the other important thing is, guaranteeing alignment also makes
performance *more predictable* in addition to generally making things
faster. You may want to mention this too somewhere.
>>>
>>> Bootstrapped and regtested on loongarch64-linux-gnu. Ok for GCC 14?
>>>
>>> [1]:https://reviews.llvm.org/D148622
nit: one space after the colon.
>>>
>>> gcc/ChangeLog:
>>>
>>> * config/loongarch/loongarch.cc
>>> (loongarch_option_override_internal): If -falign-functions is
>>> used but the alignment is not explicitly specified, set it to
>>> 4 * loongarch_issue_rate (). Likewise for -falign-loops.
>>> ---
>>> gcc/config/loongarch/loongarch.cc | 11 +++++++++++
>>> 1 file changed, 11 insertions(+)
>>>
>>> diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
>>> index 06fc1cd0604..6552484de7c 100644
>>> --- a/gcc/config/loongarch/loongarch.cc
>>> +++ b/gcc/config/loongarch/loongarch.cc
>>> @@ -6236,6 +6236,17 @@ loongarch_option_override_internal (struct gcc_options *opts)
>>> && !opts->x_optimize_size)
>>> opts->x_flag_prefetch_loop_arrays = 1;
>>>
>>> + /* Align functions and loops to (issue rate) * (insn size) to improve
>>> + the throughput of the fetching units. */
>> What about gating all of these on !opts->x_optimize_size, similar to
>> what aarch64 does?
> opts->x_flag_align_functions and opts->x_flag_align_loops are only set
> with -O2 or above unless the user manually uses -falign-functions or -
> falign-loops. If the user uses "-Os -falign-functions" as CFLAGS I'd
> assume s(he) wants to optimize for size but keep the optimized function
> alignment.
Ah, okay. Fine then.
BTW I've also added some comments to the commit message that I forgot to
review earlier.
>>> + char *align = XNEWVEC (char, 16);
>>> + sprintf (align, "%d", loongarch_issue_rate () * 4);
>>> +
>>> + if (opts->x_flag_align_functions && !opts->x_str_align_functions)
>>> + opts->x_str_align_functions = align;
>>> +
>>> + if (opts->x_flag_align_loops && !opts->x_str_align_loops)
>>> + opts->x_str_align_loops = align;
>>> +
>>> if (TARGET_DIRECT_EXTERN_ACCESS && flag_shlib)
>>> error ("%qs cannot be used for compiling a shared library",
>>> "-mdirect-extern-access");
>> Otherwise LGTM, thanks!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-04-18 12:51 ` WANG Xuerui
@ 2023-04-18 13:00 ` Xi Ruoyao
0 siblings, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-04-18 13:00 UTC (permalink / raw)
To: WANG Xuerui, gcc-patches; +Cc: Lulu Cheng, Chenghua Xu
On Tue, 2023-04-18 at 20:51 +0800, WANG Xuerui wrote:
>
> On 2023/4/18 20:45, Xi Ruoyao wrote:
> > On Tue, 2023-04-18 at 20:39 +0800, WANG Xuerui wrote:
> > > Hi,
> > >
> > > Thanks for helping confirming on GCC and porting this! I'd never know
> > > even GCC lacked this adaptation without someone actually checking... Too
> > > many things are taken for granted these days.
> > >
> > > On 2023/4/18 20:17, Xi Ruoyao wrote:
> > > > According to Xuerui's LLVM changeset [1], doing so can make a
> > > > significant performace gain.
>
> "doing so can gain significant performance" or "significant performance
> can be gained by ..."?
>
> Also the other important thing is, guaranteeing alignment also makes
> performance *more predictable* in addition to generally making things
> faster. You may want to mention this too somewhere.
Will include this in the final commit or the next revision, thanks!
/* snip */
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-04-18 12:17 [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops Xi Ruoyao
2023-04-18 12:39 ` WANG Xuerui
@ 2023-04-18 13:06 ` Lulu Cheng
2023-04-18 13:16 ` Xi Ruoyao
2023-05-29 6:09 ` Xi Ruoyao
1 sibling, 2 replies; 11+ messages in thread
From: Lulu Cheng @ 2023-04-18 13:06 UTC (permalink / raw)
To: Xi Ruoyao, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu
Hi, ruoyao:
Thank you so much for making this submission. But we are testing the
impact of these two alignment parameters
(also including -falign-jumps and -falign-lables ) on performance. So
before the result comes out, this patch will
not be merged into the main branch for the time being.
Thanks!
在 2023/4/18 下午8:17, Xi Ruoyao 写道:
> According to Xuerui's LLVM changeset [1], doing so can make a
> significant performace gain.
>
> Bootstrapped and regtested on loongarch64-linux-gnu. Ok for GCC 14?
>
> [1]:https://reviews.llvm.org/D148622
>
> gcc/ChangeLog:
>
> * config/loongarch/loongarch.cc
> (loongarch_option_override_internal): If -falign-functions is
> used but the alignment is not explicitly specified, set it to
> 4 * loongarch_issue_rate (). Likewise for -falign-loops.
> ---
> gcc/config/loongarch/loongarch.cc | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
> index 06fc1cd0604..6552484de7c 100644
> --- a/gcc/config/loongarch/loongarch.cc
> +++ b/gcc/config/loongarch/loongarch.cc
> @@ -6236,6 +6236,17 @@ loongarch_option_override_internal (struct gcc_options *opts)
> && !opts->x_optimize_size)
> opts->x_flag_prefetch_loop_arrays = 1;
>
> + /* Align functions and loops to (issue rate) * (insn size) to improve
> + the throughput of the fetching units. */
> + char *align = XNEWVEC (char, 16);
> + sprintf (align, "%d", loongarch_issue_rate () * 4);
> +
> + if (opts->x_flag_align_functions && !opts->x_str_align_functions)
> + opts->x_str_align_functions = align;
> +
> + if (opts->x_flag_align_loops && !opts->x_str_align_loops)
> + opts->x_str_align_loops = align;
> +
> if (TARGET_DIRECT_EXTERN_ACCESS && flag_shlib)
> error ("%qs cannot be used for compiling a shared library",
> "-mdirect-extern-access");
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-04-18 13:06 ` Lulu Cheng
@ 2023-04-18 13:16 ` Xi Ruoyao
2023-05-29 6:09 ` Xi Ruoyao
1 sibling, 0 replies; 11+ messages in thread
From: Xi Ruoyao @ 2023-04-18 13:16 UTC (permalink / raw)
To: Lulu Cheng, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu
On Tue, 2023-04-18 at 21:06 +0800, Lulu Cheng wrote:
> Hi, ruoyao:
>
> Thank you so much for making this submission. But we are testing the
> impact of these two alignment parameters
>
> (also including -falign-jumps and -falign-lables ) on performance. So
> before the result comes out, this patch will
>
> not be merged into the main branch for the time being.
Ok, I'll wait for the result.
>
> Thanks!
>
> 在 2023/4/18 下午8:17, Xi Ruoyao 写道:
> > According to Xuerui's LLVM changeset [1], doing so can make a
> > significant performace gain.
> >
> > Bootstrapped and regtested on loongarch64-linux-gnu. Ok for GCC 14?
> >
> > [1]:https://reviews.llvm.org/D148622
> >
> > gcc/ChangeLog:
> >
> > * config/loongarch/loongarch.cc
> > (loongarch_option_override_internal): If -falign-functions
> > is
> > used but the alignment is not explicitly specified, set it
> > to
> > 4 * loongarch_issue_rate (). Likewise for -falign-loops.
> > ---
> > gcc/config/loongarch/loongarch.cc | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/gcc/config/loongarch/loongarch.cc
> > b/gcc/config/loongarch/loongarch.cc
> > index 06fc1cd0604..6552484de7c 100644
> > --- a/gcc/config/loongarch/loongarch.cc
> > +++ b/gcc/config/loongarch/loongarch.cc
> > @@ -6236,6 +6236,17 @@ loongarch_option_override_internal (struct
> > gcc_options *opts)
> > && !opts->x_optimize_size)
> > opts->x_flag_prefetch_loop_arrays = 1;
> >
> > + /* Align functions and loops to (issue rate) * (insn size) to
> > improve
> > + the throughput of the fetching units. */
> > + char *align = XNEWVEC (char, 16);
> > + sprintf (align, "%d", loongarch_issue_rate () * 4);
> > +
> > + if (opts->x_flag_align_functions && !opts->x_str_align_functions)
> > + opts->x_str_align_functions = align;
> > +
> > + if (opts->x_flag_align_loops && !opts->x_str_align_loops)
> > + opts->x_str_align_loops = align;
> > +
> > if (TARGET_DIRECT_EXTERN_ACCESS && flag_shlib)
> > error ("%qs cannot be used for compiling a shared library",
> > "-mdirect-extern-access");
>
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-04-18 13:06 ` Lulu Cheng
2023-04-18 13:16 ` Xi Ruoyao
@ 2023-05-29 6:09 ` Xi Ruoyao
2023-05-30 1:30 ` Lulu Cheng
1 sibling, 1 reply; 11+ messages in thread
From: Xi Ruoyao @ 2023-05-29 6:09 UTC (permalink / raw)
To: Lulu Cheng, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu
On Tue, 2023-04-18 at 21:06 +0800, Lulu Cheng wrote:
> Hi, ruoyao:
>
> Thank you so much for making this submission. But we are testing the
> impact of these two alignment parameters
>
> (also including -falign-jumps and -falign-lables ) on performance. So
> before the result comes out, this patch will
>
> not be merged into the main branch for the time being.
Hi!
Is there an estimate when the benchmark will be done? If it will be
done soon I'll wait for the result before performing a full system
rebuild, otherwise I'll use my gut feeling to specify a -falign-
functions= value for the build :).
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-05-29 6:09 ` Xi Ruoyao
@ 2023-05-30 1:30 ` Lulu Cheng
2023-06-12 9:19 ` Xi Ruoyao
0 siblings, 1 reply; 11+ messages in thread
From: Lulu Cheng @ 2023-05-30 1:30 UTC (permalink / raw)
To: Xi Ruoyao, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu
在 2023/5/29 下午2:09, Xi Ruoyao 写道:
> On Tue, 2023-04-18 at 21:06 +0800, Lulu Cheng wrote:
>> Hi, ruoyao:
>>
>> Thank you so much for making this submission. But we are testing the
>> impact of these two alignment parameters
>>
>> (also including -falign-jumps and -falign-lables ) on performance. So
>> before the result comes out, this patch will
>>
>> not be merged into the main branch for the time being.
> Hi!
>
> Is there an estimate when the benchmark will be done? If it will be
> done soon I'll wait for the result before performing a full system
> rebuild, otherwise I'll use my gut feeling to specify a -falign-
> functions= value for the build :).
>
Sorry for taking so long to reply to the email. From our current test
results,
the performance of the SPEC is best when combined with -falign-loops=16,
-falign-jumps=16, -falign-functions=32 and -falign-lables=16.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-05-30 1:30 ` Lulu Cheng
@ 2023-06-12 9:19 ` Xi Ruoyao
2023-06-13 2:20 ` Lulu Cheng
0 siblings, 1 reply; 11+ messages in thread
From: Xi Ruoyao @ 2023-06-12 9:19 UTC (permalink / raw)
To: Lulu Cheng, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu
On Tue, 2023-05-30 at 09:30 +0800, Lulu Cheng wrote:
>
> 在 2023/5/29 下午2:09, Xi Ruoyao 写道:
> > On Tue, 2023-04-18 at 21:06 +0800, Lulu Cheng wrote:
> > > Hi, ruoyao:
> > >
> > > Thank you so much for making this submission. But we are testing
> > > the
> > > impact of these two alignment parameters
> > >
> > > (also including -falign-jumps and -falign-lables ) on performance.
> > > So
> > > before the result comes out, this patch will
> > >
> > > not be merged into the main branch for the time being.
> > Hi!
> >
> > Is there an estimate when the benchmark will be done? If it will be
> > done soon I'll wait for the result before performing a full system
> > rebuild, otherwise I'll use my gut feeling to specify a -falign-
> > functions= value for the build :).
> >
> Sorry for taking so long to reply to the email. From our current test
> results,
>
> the performance of the SPEC is best when combined with -falign-
> loops=16,
>
> -falign-jumps=16, -falign-functions=32 and -falign-lables=16.
I've completed a system rebuild with -falign-
{jumps,functions,labels}=16. I've missed -falign-loops=16 but the doc
says -falign-labels=16 implies -falign-jumps=16 and -falign-loops=16 (if
-falign-jumps or -falign-loops are not set explicitly with a larger
value).
I'll make a patch to set -falign-functions=32 and -falign-labels=16 with
-mtune={la464,loongarch64} after setting a basic develop environment on
the new system... And I'm wondering if things will change with LA664
:).
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops
2023-06-12 9:19 ` Xi Ruoyao
@ 2023-06-13 2:20 ` Lulu Cheng
0 siblings, 0 replies; 11+ messages in thread
From: Lulu Cheng @ 2023-06-13 2:20 UTC (permalink / raw)
To: Xi Ruoyao, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu
在 2023/6/12 下午5:19, Xi Ruoyao 写道:
> On Tue, 2023-05-30 at 09:30 +0800, Lulu Cheng wrote:
>> 在 2023/5/29 下午2:09, Xi Ruoyao 写道:
>>> On Tue, 2023-04-18 at 21:06 +0800, Lulu Cheng wrote:
>>>> Hi, ruoyao:
>>>>
>>>> Thank you so much for making this submission. But we are testing
>>>> the
>>>> impact of these two alignment parameters
>>>>
>>>> (also including -falign-jumps and -falign-lables ) on performance.
>>>> So
>>>> before the result comes out, this patch will
>>>>
>>>> not be merged into the main branch for the time being.
>>> Hi!
>>>
>>> Is there an estimate when the benchmark will be done? If it will be
>>> done soon I'll wait for the result before performing a full system
>>> rebuild, otherwise I'll use my gut feeling to specify a -falign-
>>> functions= value for the build :).
>>>
>> Sorry for taking so long to reply to the email. From our current test
>> results,
>>
>> the performance of the SPEC is best when combined with -falign-
>> loops=16,
>>
>> -falign-jumps=16, -falign-functions=32 and -falign-lables=16.
> I've completed a system rebuild with -falign-
> {jumps,functions,labels}=16. I've missed -falign-loops=16 but the doc
> says -falign-labels=16 implies -falign-jumps=16 and -falign-loops=16 (if
> -falign-jumps or -falign-loops are not set explicitly with a larger
> value).
>
> I'll make a patch to set -falign-functions=32 and -falign-labels=16 with
> -mtune={la464,loongarch64} after setting a basic develop environment on
> the new system... And I'm wondering if things will change with LA664
> :).
>
>
We haven't tested it on LA664 yet, so it's not clear whether this is
consistent with LA464.
This test will not be done on LA664 anytime soon. But once I've done the
test, I'll let you know by email.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-06-13 2:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 12:17 [PATCH] LoongArch: Set 4 * (issue rate) as the default for -falign-functions and -falign-loops Xi Ruoyao
2023-04-18 12:39 ` WANG Xuerui
2023-04-18 12:45 ` Xi Ruoyao
2023-04-18 12:51 ` WANG Xuerui
2023-04-18 13:00 ` Xi Ruoyao
2023-04-18 13:06 ` Lulu Cheng
2023-04-18 13:16 ` Xi Ruoyao
2023-05-29 6:09 ` Xi Ruoyao
2023-05-30 1:30 ` Lulu Cheng
2023-06-12 9:19 ` Xi Ruoyao
2023-06-13 2:20 ` Lulu Cheng
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).