public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: wschmidt@linux.ibm.com
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	David Edelsohn <dje.gcc@gmail.com>,
	Peter Bergner <bergner@linux.ibm.com>,
	Michael Meissner <meissner@linux.ibm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v3] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]
Date: Wed, 9 Feb 2022 10:23:19 +0800	[thread overview]
Message-ID: <c3e4fd91-45a1-370a-5186-6592456f2b0b@linux.ibm.com> (raw)
In-Reply-To: <fc0174e9-f63d-6fcc-ed84-28772c65dda4@linux.ibm.com>

Hi Bill,

on 2022/2/9 上午4:29, Bill Schmidt wrote:
> Hi!
> 
> From some discussion today, I think we want to limit the scope of
> this patch to just the power8-fusion flag that's causing trouble for
> now, given stage 4.  We've talked about making power8-fusion a do-
> nothing flag, since it doesn't add much benefit now and probably
> shouldn't be a separate flag anyway.  Having it as a meaningless
> flag makes it more palatable to add an exception for it in the
> inlining path.
> 
> Others, feel free to weigh in.
> 

Many thanks for caring about this.  It's a good idea to handle this
power8-fusion specially for now.

BR,
Kewen

> Thanks,
> Bill
> 
> On 1/5/22 1:34 AM, Kewen.Lin wrote:
>> Hi,
>>
>> This patch is to fix the inconsistent behaviors for non-LTO mode
>> and LTO mode.  As Martin pointed out, currently the function
>> rs6000_can_inline_p simply makes it inlinable if callee_tree is
>> NULL, but it's unexpected, we should use the command line options
>> from target_option_default_node as default.
>>
>> It replaces rs6000_isa_flags with target_option_default_node when
>> caller_tree is NULL since it's more straightforward and doesn't
>> suffer from some bug not to keep rs6000_isa_flags as default.
>>
>> It also extends the scope of the check for the case that callee
>> has explicit set options, inlining in test case pr102059-5.c can
>> happen unexpectedly before, it's fixed accordingly.
>>
>> As Richi/Mike pointed out, some tuning flags like MASK_P8_FUSION
>> can be neglected for always inlining, this patch also takes some
>> flags when the callee is attributed by always_inline.
>>
>> v1: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html
>> v2: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586112.html
>>
>> This patch is one re-post of this updated version[1] and also
>> rebased and adjusted on top of the related commit r12-6219.
>>
>> Bootstrapped and regtested on powerpc64-linux-gnu P8 and
>> powerpc64le-linux-gnu P9 and P10.
>>
>> Is it ok for trunk?
>>
>> [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586296.html
>>
>> BR,
>> Kewen
>> -----
>> gcc/ChangeLog:
>>
>> 	PR target/102059
>> 	* config/rs6000/rs6000.c (rs6000_can_inline_p): Adjust with
>> 	target_option_default_node and consider always_inline_safe flags.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 	PR target/102059
>> 	* gcc.target/powerpc/pr102059-4.c: New test.
>> 	* gcc.target/powerpc/pr102059-5.c: New test.
>> 	* gcc.target/powerpc/pr102059-6.c: New test.
>> 	* gcc.target/powerpc/pr102059-7.c: New test.
>> 	* gcc.target/powerpc/pr102059-8.c: New test.
>> 	* gcc.dg/lto/pr102059-1_0.c: Remove unneeded option.
>>
>>


      reply	other threads:[~2022-02-09  2:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05  7:34 Kewen.Lin
2022-01-19  6:39 ` PING^1 " Kewen.Lin
2022-01-26  2:21   ` PING^2 " Kewen.Lin
2022-02-07  5:59     ` PING^3 " Kewen.Lin
2022-02-07  7:53 ` Segher Boessenkool
2022-02-07  9:42   ` Kewen.Lin
2022-02-08 20:29 ` Bill Schmidt
2022-02-09  2:23   ` Kewen.Lin [this message]

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=c3e4fd91-45a1-370a-5186-6592456f2b0b@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@linux.ibm.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).