From: "Fei Gao" <gaofei@eswincomputing.com>
To: jeffreyalaw <jeffreyalaw@gmail.com>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: "Kito Cheng" <kito.cheng@gmail.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
Sinan <sinan.lin@linux.alibaba.com>,
jiawei <jiawei@iscas.ac.cn>
Subject: Re: Re: [PATCH 1/2] allow targets to check shrink-wrap-separate enabled or not
Date: Tue, 29 Aug 2023 09:28:38 +0800 [thread overview]
Message-ID: <2023082909283749551438@eswincomputing.com> (raw)
In-Reply-To: <9879d7a7-7635-b5b8-7bef-c1691208b9d8@gmail.com>
On 2023-08-29 06:54 Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
>
>On 8/28/23 01:47, Fei Gao wrote:
>> no functional changes but allow targets to check shrink-wrap-separate enabled or not.
>>
>> gcc/ChangeLog:
>>
>> * shrink-wrap.cc (try_shrink_wrapping_separate):call
>> use_shrink_wrapping_separate.
>> (use_shrink_wrapping_separate): wrap the condition
>> check in use_shrink_wrapping_separate.
>> * shrink-wrap.h (use_shrink_wrapping_separate): add to extern
>So as I mentioned earlier today in the older thread, can we use
>override_options to do this?
>
>If we look at aarch64_override_options we have this:
>
> /* The pass to insert speculation tracking runs before
> shrink-wrapping and the latter does not know how to update the
> tracking status. So disable it in this case. */
> if (aarch64_track_speculation)
> flag_shrink_wrap = 0;
>
>We kind of want this instead
>
> if (flag_shrink_wrap)
> {
> turn off whatever target bits enable the cm.push/cm.pop insns
> }
>
>
>This does imply that we have a distinct target flag to enable/disable
>those instructions. But that seems like a good thing to have anyway.
I'm afraid we cannot simply resolve the confilict based on
flag_shrink_wrap/flag_shrink_wrap_separate only, as they're set true from -O1 onwards,
which means zcmp is disabled almostly unless -fno-shrink-warp/-fno-shrink-warp-separate
are explictly given.
So after discussion with Kito, we would like to turn on zcmp for -Os and shrink-warp-separate
for the speed perfered optimization. use_shrink_wrapping_separate in this patch provide the
chance for this check. No new hook is needed.
Please let me know what you think.
BR,
Fei
>
>jeff
next prev parent reply other threads:[~2023-08-29 1:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 7:47 [PATCH 0/2] support cm.push cm.pop cm.popret in zcmp and resolve confilct with shrink-wrap-separate Fei Gao
2023-08-28 7:47 ` [PATCH 1/2] allow targets to check shrink-wrap-separate enabled or not Fei Gao
2023-08-28 22:54 ` Jeff Law
2023-08-29 1:28 ` Fei Gao [this message]
2023-08-29 1:46 ` Jeff Law
2023-09-01 1:20 ` Fei Gao
2023-08-28 7:47 ` [PATCH 2/2][V5][RISC-V]support cm.push cm.pop cm.popret in zcmp and resolve confilct with shrink-wrap-separate Fei Gao
2023-08-28 9:27 ` [PATCH 0/2] support " Kito Cheng
2023-08-28 10:36 ` Fei Gao
2023-08-29 2:41 ` Kito Cheng
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=2023082909283749551438@eswincomputing.com \
--to=gaofei@eswincomputing.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=jiawei@iscas.ac.cn \
--cc=kito.cheng@gmail.com \
--cc=palmer@dabbelt.com \
--cc=sinan.lin@linux.alibaba.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).