public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/104271] [12 Regression] 538.imagick_r run-time at -Ofast -march=native regressed by 26% on Intel Cascade Lake server CPU
Date: Tue, 29 Mar 2022 10:39:01 +0000	[thread overview]
Message-ID: <bug-104271-4-GvzEbuI03f@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104271-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104271

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jamborm at gcc dot gnu.org

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to cuilili from comment #7)
> Created attachment 52706 [details]
> Add a heuristic for eliminate redundant load and store in inline pass.
> 
> Hi Richard,
> 
> Could you help take a look? This is my first time adding code in mid-end,
> hope you can give me some advice, thank you!
> 
> I add a INLINE_HINT_eliminate_load_and_store hint in to inline pass. when
> callee's memory access is caller's local memory parameter and access size is
> greater than the target threshold, we will enable the hint. with the hint,
> inlining_insns_auto will enlarge the bound. The target hook is only enabled
> for x86 now.
> 
> With the patch applied
> Icelake server: 538.imagic_r get 15.18% improvement for multicopy and 40.78%
> improvement for single copy with no measurable changes for other benchmarks.
> 
> Casecadelake: 538.imagic_r get 12.4% improvement for multicopy with and code
> size increased by 0.4%. With no measurable changes for other benchmarks.
> 
> Znver3 server: 538.imagic_r get 9.6% improvement for multicopy with and code
> size increased by 0.5%. With no measurable changes for other benchmarks.

It's an interesting idea, note Honza knows better about IPA modref and
inlining than me.  What I doubt is that you can directly use IPA modref
info to determine whether inlining will likely elide a store/load pair
since IIRC the modref info is for the whole function.

IPA SRA might perform the kind of analysis that is contained to the
call context and that might be available here already (and eventually
even IPA SRA considers passing the stored/loaded values by value?)

But yes, having a stream of up to N (independent?) stores before each call
plus a stream of up to M (independent hoistable to function start?) loads
at each function start would make such analysis possible.

  parent reply	other threads:[~2022-03-29 10:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 17:12 [Bug target/104271] New: " jamborm at gcc dot gnu.org
2022-01-31  8:11 ` [Bug target/104271] [12 Regression] " rguenth at gcc dot gnu.org
2022-01-31  9:08 ` marxin at gcc dot gnu.org
2022-02-07  1:31 ` crazylht at gmail dot com
2022-02-07 18:10 ` jamborm at gcc dot gnu.org
2022-02-08  2:49 ` crazylht at gmail dot com
2022-03-23 12:37 ` rguenth at gcc dot gnu.org
2022-03-23 16:17 ` jamborm at gcc dot gnu.org
2022-03-24  8:34 ` lili.cui at intel dot com
2022-03-29  6:48 ` lili.cui at intel dot com
2022-03-29 10:39 ` rguenth at gcc dot gnu.org [this message]
2022-04-15 11:04 ` lili.cui at intel dot com
2022-05-06  8:32 ` [Bug target/104271] [12/13 " jakub at gcc dot gnu.org
2022-11-28  3:24 ` lili.cui at intel dot com
2023-05-08 12:23 ` [Bug target/104271] [12 " rguenth at gcc dot gnu.org
2023-06-07  2:07 ` lili.cui at intel dot com
2023-06-07  7:02 ` sjames at gcc dot gnu.org
2023-06-07  7:14 ` rguenth at gcc dot gnu.org

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=bug-104271-4-GvzEbuI03f@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).