From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: "Cui, Lili" <lili.cui@intel.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
Richard Guenther <richard.guenther@gmail.com>,
linkw@linux.ibm.com
Subject: Re: [PATCH] Handle FMA friendly in reassoc pass
Date: Thu, 8 Jun 2023 13:51:18 +0400 [thread overview]
Message-ID: <F2A153DA-A9B7-48B8-B1E7-7E6572E939C3@linaro.org> (raw)
In-Reply-To: <20230524233005.3284950-1-lili.cui@intel.com>
> On May 25, 2023, at 03:30, Cui, Lili via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>
> From: Lili Cui <lili.cui@intel.com>
>
> Make some changes in reassoc pass to make it more friendly to fma pass later.
> Using FMA instead of mult + add reduces register pressure and insruction
> retired.
>
> There are mainly two changes
> 1. Put no-mult ops and mult ops alternately at the end of the queue, which is
> conducive to generating more fma and reducing the loss of FMA when breaking
> the chain.
> 2. Rewrite the rewrite_expr_tree_parallel function to try to build parallel
> chains according to the given correlation width, keeping the FMA chance as
> much as possible.
>
> With the patch applied
>
> On ICX:
> 507.cactuBSSN_r: Improved by 1.7% for multi-copy .
> 503.bwaves_r : Improved by 0.60% for single copy .
> 507.cactuBSSN_r: Improved by 1.10% for single copy .
> 519.lbm_r : Improved by 2.21% for single copy .
> no measurable changes for other benchmarks.
>
> On aarch64
> 507.cactuBSSN_r: Improved by 1.7% for multi-copy.
> 503.bwaves_r : Improved by 6.00% for single-copy.
> no measurable changes for other benchmarks.
Hi Cui,
I'm seeing a 4% slowdown on 436.cactusADM from SPEC CPU2006 on aarch64-linux-gnu (Cortex-A57) when compiling with "-O2 -flto". All other benchmarks seem neutral to this patch, and I didn't observe the slow down with plain -O2 no-LTO or with -O3.
Is this something interesting to investigate? I'll be happy to assist.
Kind regards,
--
Maxim Kuvyrkov
https://www.linaro.org
prev parent reply other threads:[~2023-06-08 9:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 23:30 Cui, Lili
2023-05-29 7:50 ` Cui, Lili
2023-06-07 3:47 ` Di Zhao OS
2023-06-07 15:38 ` Cui, Lili
2023-06-08 9:51 ` Maxim Kuvyrkov [this message]
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=F2A153DA-A9B7-48B8-B1E7-7E6572E939C3@linaro.org \
--to=maxim.kuvyrkov@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=lili.cui@intel.com \
--cc=linkw@linux.ibm.com \
--cc=richard.guenther@gmail.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).