From: Xionghu Luo <luoxhu@linux.ibm.com>
To: gcc-patches@gcc.gnu.org
Cc: segher@kernel.crashing.org, dje.gcc@gmail.com,
wschmidt@linux.ibm.com, guojiufu@linux.ibm.com,
linkw@gcc.gnu.org, hubicka@kam.mff.cuni.cz,
richard.guenther@gmail.com, Xionghu Luo <luoxhu@linux.ibm.com>
Subject: [PATCH 0/3] Dependency patches for hoist LIM code to cold loop
Date: Tue, 7 Dec 2021 23:54:13 -0600 [thread overview]
Message-ID: <20211208055416.1415283-1-luoxhu@linux.ibm.com> (raw)
This patchset is a recollect of previously sent patches. Thanks
Richard that The "Don't move cold code out of loop by checking bb count"
is approved[1], but there are still 3 prerequesite patches to supplement
or avoid regression.
1) Patch [1/3] is the RTL part of not hoisting LIM code out of cold loop, it
could improve perlbench by 7.69% [2].
2) Patch [2/3] is a test case regression fix for pr103270.c, after enabling
gimple part of hoisting LIM code to coldest loop [1], the store
instruction in loop won't be moved out of inner loop, it is caused by a
jump-threading patch unexpectedly turning a hot inner loop to cold loop,
this patch could recover the inner loop to be hot[3].
3) As data showed in [2], besides improvement, there is also a small regression
on SPEC2017 544.nab_r (-1.55%). After investigation, it turned out to be
the profile count and probability is not correctly adjusted in loop
split, with this patch [3/3], the only regression is also fixed. This version
slightly updates [4] to fix ICEs.
[1] https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586319.html
[2] https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580109.html
[3] https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585195.html
[4] https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585290.html
Xionghu Luo (3):
loop-invariant: Don't move cold bb instructions to preheader in RTL
Fix incorrect loop exit edge probability [PR103270]
Fix loop split incorrect count and probability
gcc/loop-invariant.c | 10 ++--
gcc/predict.c | 10 ++--
gcc/tree-ssa-loop-split.c | 85 +++++++++++++++++++++++++++++----
gcc/testsuite/gcc.dg/pr103270.c | 19 ++++++++
4 files changed, 109 insertions(+), 15 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/pr103270.c
--
2.25.1
next reply other threads:[~2021-12-08 5:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 5:54 Xionghu Luo [this message]
2021-12-08 5:54 ` [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL Xionghu Luo
2021-12-08 23:26 ` Jeff Law
2021-12-13 9:14 ` Jan Hubicka
2021-12-13 10:24 ` Jan Hubicka
2021-12-14 9:21 ` Xionghu Luo
2021-12-16 11:20 ` Jan Hubicka
2021-12-17 1:30 ` Xionghu Luo
2021-12-29 1:43 ` Xionghu Luo
2021-12-29 12:55 ` Jan Hubicka
2021-12-30 6:08 ` Xionghu Luo
2021-12-08 5:54 ` [PATCH 2/3] Fix incorrect loop exit edge probability [PR103270] Xionghu Luo
2021-12-08 23:28 ` Jeff Law
2021-12-13 9:25 ` Jan Hubicka
2021-12-14 9:27 ` Xionghu Luo
2021-12-15 6:40 ` Xionghu Luo
2021-12-16 11:18 ` Jan Hubicka
2021-12-21 3:56 ` Xionghu Luo
2021-12-08 5:54 ` [PATCH 3/3] Fix loop split incorrect count and probability Xionghu Luo
2021-12-08 23:47 ` Jeff Law
2021-12-13 8:57 ` Xionghu Luo
2021-12-21 3:57 ` Xionghu Luo
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=20211208055416.1415283-1-luoxhu@linux.ibm.com \
--to=luoxhu@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=guojiufu@linux.ibm.com \
--cc=hubicka@kam.mff.cuni.cz \
--cc=linkw@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.ibm.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).