From: Juzhe-Zhong <juzhe.zhong@rivai.ai>
To: gcc-patches@gcc.gnu.org
Cc: vmakarov@redhat.com, richard.sandiford@arm.com, jin.xia@rivai.ai,
dimitar@dinux.eu, Juzhe-Zhong <juzhe.zhong@rivai.ai>,
Lehua Ding <lehua.ding@rivai.ai>
Subject: [SUBREG V4 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA
Date: Mon, 13 May 2024 06:57:34 +0800 [thread overview]
Message-ID: <20240512225738.528917-1-juzhe.zhong@rivai.ai> (raw)
V3: Address comments from Dimitar Dimitrov
V4: Move detailed function from subreg-live-range.h to subreg-live-range.cc.
These patches are used to add a new data flow DF_LIVE_SUBREG,
which will track subreg liveness and then apply it to IRA and LRA
passes (enabled via -O3 or -ftrack-subreg-liveness). These patches
are for GCC 15. And these codes are pushed to the devel/subreg-coalesce
branch. In addition, my colleague Shuo Chen will also be involved in some
of the remain work, thank you for your support.
These patches are separated from the subreg-coalesce patches submitted
a few months ago. I refactored the code according to comments. The next
patches will support subreg coalesce base on they. Here are some data
abot build time of SPEC INT 2017 (x86-64 target):
baseline baseline(+track-subreg-liveness)
specint2017 build time : 1892s 1883s
Regarding build times, I've run it a few times, but they all seem to take
much less time. Since the difference is small, it's possible that it's just
a change in environment. But it's theoretically possible, since supporting
subreg-liveness could have reduced the number of living regs.
For memory usage, I trided PR 69609 by valgrind, peak memory size grow from
2003910656 to 2003947520, very small increase.
Note that these patches don't enable register coalesce with subreg liveness in IRA/LRA,
so no performance change as expected.
And we will enable register coalsece with subreg liveness tracking in the followup patches.
Bootstrap and Regtested on x86-64 no regression.
Co-authored-by: Lehua Ding <lehua.ding@rivai.ai>
Juzhe-Zhong (4):
DF: Add -ftrack-subreg-liveness option
DF: Add DF_LIVE_SUBREG problem
IRA: Apply DF_LIVE_SUBREG data
LRA: Apply DF_LIVE_SUBREG data
gcc/Makefile.in | 1 +
gcc/common.opt | 4 +
gcc/common.opt.urls | 3 +
gcc/df-problems.cc | 886 ++++++++++++++++++++++++++++++++++++++-
gcc/df.h | 159 +++++++
gcc/doc/invoke.texi | 8 +
gcc/ira-build.cc | 7 +-
gcc/ira-color.cc | 8 +-
gcc/ira-emit.cc | 12 +-
gcc/ira-lives.cc | 7 +-
gcc/ira.cc | 19 +-
gcc/lra-coalesce.cc | 27 +-
gcc/lra-constraints.cc | 109 ++++-
gcc/lra-int.h | 4 +
gcc/lra-lives.cc | 357 ++++++++++++----
gcc/lra-remat.cc | 8 +-
gcc/lra-spills.cc | 27 +-
gcc/lra.cc | 10 +-
gcc/opts.cc | 1 +
gcc/regs.h | 5 +
gcc/sbitmap.cc | 98 +++++
gcc/sbitmap.h | 2 +
gcc/subreg-live-range.cc | 233 ++++++++++
gcc/subreg-live-range.h | 60 +++
gcc/timevar.def | 1 +
25 files changed, 1920 insertions(+), 136 deletions(-)
create mode 100644 gcc/subreg-live-range.cc
create mode 100644 gcc/subreg-live-range.h
--
2.36.3
next reply other threads:[~2024-05-12 22:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-12 22:57 Juzhe-Zhong [this message]
2024-05-12 22:57 ` [SUBREG V4 1/4] DF: Add -ftrack-subreg-liveness option Juzhe-Zhong
2024-06-13 15:54 ` Richard Sandiford
2024-05-12 22:57 ` [SUBREG V4 2/4] DF: Add DF_LIVE_SUBREG problem Juzhe-Zhong
2024-06-13 15:57 ` Richard Sandiford
2024-05-12 22:57 ` [SUBREG V4 3/4] IRA: Apply DF_LIVE_SUBREG data Juzhe-Zhong
2024-05-12 22:57 ` [SUBREG V4 4/4] LRA: " Juzhe-Zhong
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=20240512225738.528917-1-juzhe.zhong@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=dimitar@dinux.eu \
--cc=gcc-patches@gcc.gnu.org \
--cc=jin.xia@rivai.ai \
--cc=lehua.ding@rivai.ai \
--cc=richard.sandiford@arm.com \
--cc=vmakarov@redhat.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).