From: Lehua Ding <lehua.ding@rivai.ai>
To: gcc-patches@gcc.gnu.org
Cc: juzhe.zhong@rivai.ai, shuo.chen@rivai.ai, jin.xia@rivai.ai,
vmakarov@redhat.com, richard.sandiford@arm.com
Subject: [PATCH 1/4] df: Add -ftrack-subreg-liveness option
Date: Wed, 24 Apr 2024 18:05:02 +0800 [thread overview]
Message-ID: <20240424100505.1301-2-lehua.ding@rivai.ai> (raw)
In-Reply-To: <20240424100505.1301-1-lehua.ding@rivai.ai>
Add new flag -ftrack-subreg-liveness to enable track-subreg-liveness.
This flag is enabled at -O3/fast.
gcc/ChangeLog:
* common.opt: add -ftrack-subreg-liveness option.
* opts.cc: auto aneble -ftrack-subreg-liveness in -O3/fast
---
gcc/common.opt | 4 ++++
gcc/common.opt.urls | 3 +++
gcc/doc/invoke.texi | 8 ++++++++
gcc/opts.cc | 1 +
4 files changed, 16 insertions(+)
diff --git a/gcc/common.opt b/gcc/common.opt
index ad348844775..bd030973434 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2157,6 +2157,10 @@ fira-share-spill-slots
Common Var(flag_ira_share_spill_slots) Init(1) Optimization
Share stack slots for spilled pseudo-registers.
+ftrack-subreg-liveness
+Common Var(flag_track_subreg_liveness) Init(0) Optimization
+Track subreg liveness information.
+
fira-verbose=
Common RejectNegative Joined UInteger Var(flag_ira_verbose) Init(5)
-fira-verbose=<number> Control IRA's level of diagnostic messages.
diff --git a/gcc/common.opt.urls b/gcc/common.opt.urls
index f71ed80a34b..59f27a6f7c6 100644
--- a/gcc/common.opt.urls
+++ b/gcc/common.opt.urls
@@ -880,6 +880,9 @@ UrlSuffix(gcc/Optimize-Options.html#index-fira-share-save-slots)
fira-share-spill-slots
UrlSuffix(gcc/Optimize-Options.html#index-fira-share-spill-slots)
+ftrack-subreg-liveness
+UrlSuffix(gcc/Optimize-Options.html#index-ftrack-subreg-liveness)
+
fira-verbose=
UrlSuffix(gcc/Developer-Options.html#index-fira-verbose)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 27c31ab0c86..9724cbb32ba 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -13186,6 +13186,14 @@ Disable sharing of stack slots allocated for pseudo-registers. Each
pseudo-register that does not get a hard register gets a separate
stack slot, and as a result function stack frames are larger.
+@opindex ftrack-subreg-liveness
+@item -ftrack-subreg-liveness
+Enable tracking subreg liveness information. This infomation allows IRA
+and LRA to support subreg coalesce feature which can improve the quality
+of register allocation.
+
+This option is enabled at level @option{-O3} for all targets.
+
@opindex flra-remat
@item -flra-remat
Enable CFG-sensitive rematerialization in LRA. Instead of loading
diff --git a/gcc/opts.cc b/gcc/opts.cc
index a90dc57f8b5..7b5d905a241 100644
--- a/gcc/opts.cc
+++ b/gcc/opts.cc
@@ -689,6 +689,7 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_3_PLUS, OPT_funswitch_loops, NULL, 1 },
{ OPT_LEVELS_3_PLUS, OPT_fvect_cost_model_, NULL, VECT_COST_MODEL_DYNAMIC },
{ OPT_LEVELS_3_PLUS, OPT_fversion_loops_for_strides, NULL, 1 },
+ { OPT_LEVELS_3_PLUS, OPT_ftrack_subreg_liveness, NULL, 1 },
/* -O3 parameters. */
{ OPT_LEVELS_3_PLUS, OPT__param_max_inline_insns_auto_, NULL, 30 },
--
2.25.1
next prev parent reply other threads:[~2024-04-24 10:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 10:05 [PATCH V2 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA Lehua Ding
2024-04-24 10:05 ` Lehua Ding [this message]
2024-04-24 10:05 ` [PATCH 2/4] df: Add DF_LIVE_SUBREG problem Lehua Ding
2024-04-25 20:56 ` Dimitar Dimitrov
2024-05-08 2:46 ` Lehua Ding
2024-05-08 3:34 ` 陈硕
2024-05-08 15:57 ` Dimitar Dimitrov
2024-05-08 22:54 ` 钟居哲
2024-04-24 10:05 ` [PATCH 3/4] ira: Apply DF_LIVE_SUBREG data Lehua Ding
2024-04-24 10:05 ` [PATCH 4/4] lra: " Lehua Ding
-- strict thread matches above, loose matches on Subject: below --
2024-02-03 10:50 [PATCH 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA Lehua Ding
2024-02-03 10:50 ` [PATCH 1/4] df: Add -ftrack-subreg-liveness option Lehua Ding
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=20240424100505.1301-2-lehua.ding@rivai.ai \
--to=lehua.ding@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=jin.xia@rivai.ai \
--cc=juzhe.zhong@rivai.ai \
--cc=richard.sandiford@arm.com \
--cc=shuo.chen@rivai.ai \
--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).