public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	"Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] rs6000/test: Update some cases with -mdejagnu-tune
Date: Fri, 22 Jul 2022 13:53:50 -0500	[thread overview]
Message-ID: <7b179407-cb97-f86d-0948-00d5a67f2cb4@linux.ibm.com> (raw)
In-Reply-To: <20220722181712.GO25951@gate.crashing.org>

On 7/22/22 1:17 PM, Segher Boessenkool wrote:
> On Fri, Jul 22, 2022 at 10:22:51AM +0800, Kewen.Lin wrote:
>> on 2022/7/22 02:48, Segher Boessenkool wrote:
>> As PR106345 shows, GCC can use an explicit tune setting when it's
>> configured, even if there is one "-mdejagnu-cpu=", it doesn't
>> override the explicit given one, so we need one explicit
>> "-mdejagnu-tune=".
> 
> And that is the problem.  GCC's automatic setting is *not* an explicit
> option, not given by the user.  --with-tune= should not result in adding
> an -mtune= option in the resulting compiler, it should not set command-
> line options.
>
[snip]
> And it should not do that.

Currently, our rs6000.h has this:

/* Only for use in the testsuite: -mdejagnu-cpu= simply overrides -mcpu=.
   With older versions of Dejagnu the command line arguments you set in
   RUNTESTFLAGS override those set in the testcases; with this option,
   the testcase will always win.  Ditto for -mdejagnu-tune=.  */
#define DRIVER_SELF_SPECS \
  "%{mdejagnu-cpu=*: %<mcpu=* -mcpu=%*}", \
  "%{mdejagnu-tune=*: %<mtune=* -mtune=%*}", \
  "%{mdejagnu-*: %<mdejagnu-*}", \
   SUBTARGET_DRIVER_SELF_SPECS


This means -mdejagnu-cpu= usage will only filter out -mcpu= usage.
I guess it should also filter out all -mtune= usage as well.
That way, we'll tune according to the -mdejagnu-cpu= option which is
what we want.  That was an oversight on my part when I added the code. :-(

So I think the way the code above *should* work is:
  1) Any -mdejagnu-cpu= usage should filter out all -mcpu= and -mtune= options.
  2) Any -mdejagnu-tune= usage should filter all -mtune= options.
     It should not filter out any -mcpu= options.

I believe that should fix the issue we're seeing.

Peter


  reply	other threads:[~2022-07-22 18:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20  9:31 Kewen.Lin
2022-07-21 18:48 ` Segher Boessenkool
2022-07-22  2:22   ` Kewen.Lin
2022-07-22 18:17     ` Segher Boessenkool
2022-07-22 18:53       ` Peter Bergner [this message]
2022-07-22 19:28         ` Peter Bergner
2022-07-25  6:09           ` Kewen.Lin

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=7b179407-cb97-f86d-0948-00d5a67f2cb4@linux.ibm.com \
    --to=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    /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).