public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Dependency patches for hoist LIM code to cold loop
@ 2021-12-08  5:54 Xionghu Luo
  2021-12-08  5:54 ` [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL Xionghu Luo
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Xionghu Luo @ 2021-12-08  5:54 UTC (permalink / raw)
  To: gcc-patches
  Cc: segher, dje.gcc, wschmidt, guojiufu, linkw, hubicka,
	richard.guenther, Xionghu Luo

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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-12-30  6:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08  5:54 [PATCH 0/3] Dependency patches for hoist LIM code to cold loop Xionghu Luo
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

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).