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 ipa/108226] __restrict on inlined function parameters does not function as expected Date: Mon, 09 Jan 2023 13:54:28 +0000 [thread overview] Message-ID: <bug-108226-4-gp0Yp1UKpw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108226-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108226 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamborm at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Component|tree-optimization |ipa Last reconfirmed| |2023-01-09 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- For the first case it's the order of inlining - we first inline Func2 into Func3 early and only then inline Func1 at IPA time which fails to put the Func1 accesses under __restrict. For the second case it's with __restrict: > ./cc1 -quiet t.c -O2 -fopt-info -fdump-tree-all t.c:27:3: optimized: Inlining Func2/2 into Func3/3. t.c:22:3: optimized: Inlined Func1.isra/5 into Func3/3 which now has time 12.500000 and size 21, net change of -7. vs without > ./cc1 -quiet t.c -O2 -fopt-info -fdump-tree-all t.c:27:3: optimized: Inlining Func2/2 into Func3/3. t.c:22:3: optimized: Inlined Func1.constprop.isra/6 into Func3/3 which now has time 4.375000 and size 7, net change of -21. so somehow the restrict qualification pessimizes IPA-CP?! Martin? Note with restrict it's again the first issue. -fno-early-inlining helps there.
next prev parent reply other threads:[~2023-01-09 13:54 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-26 0:05 [Bug tree-optimization/108226] New: " jhaberman at gmail dot com 2023-01-09 13:54 ` rguenth at gcc dot gnu.org [this message] 2023-02-17 13:57 ` [Bug ipa/108226] " jamborm 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-108226-4-gp0Yp1UKpw@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: linkBe 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).