public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Stump <mikestump@comcast.net>
To: Christophe Lyon <christophe.lyon@linaro.org>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [testsuite] Clean up effective_target cache
Date: Tue, 25 Aug 2015 15:44:00 -0000	[thread overview]
Message-ID: <14DA89C6-4F95-4A90-847A-6B6E6909475A@comcast.net> (raw)
In-Reply-To: <CAKdteObvT_g=usMxP_G0AyUWqFrXCj2AhQSj=YUGvi8v3=F1Rg@mail.gmail.com>

On Aug 25, 2015, at 1:14 AM, Christophe Lyon <christophe.lyon@linaro.org> wrote:
> Some subsets of the tests override ALWAYS_CXXFLAGS or
> TEST_ALWAYS_FLAGS and perform effective_target support tests using
> these modified flags.

> This patch adds a new function 'clear_effective_target_cache', which
> is called at the end of every .exp file which overrides
> ALWAYS_CXXFLAGS or TEST_ALWAYS_FLAGS.

So, a simple English directive somewhere that says, if one changes ALWAYS_CXXFLAGS or TEST_ALWAYS_FLAGS then they should do a clear_effective_target_cache at the end as the target cache can make decisions based upon the flags, and those decisions need to be redone when the flags change would be nice.

I do wonder, do we need to reexamine when setting the flags?  I’m thinking of a sequence like: non-thumb default, is_thumb, set flags (thumb), is_thumb.  Anyway, safe to punt this until someone discovers it or is reasonable sure it happens.

Anyway, all looks good.  Ok.

> However, I noticed that lib/g++.exp changes ALWAYS_CXXFLAGS, but does
> not appear to restore it. In doubt, I didn't change it.

Yeah, I examined it.  It seems like it might not matter, as anyone setting and unsetting would come in cleared, and if they didn’t, it should be roughly the same exact state, meaning, no clearing necessary.  I think it is safe to punt this until someone finds a bug or can see a way that it would matter.  I also don’t think it would hurt to clear, if someone wanted to refactor the code a bit and make the clearing and the cleanup a little more automatic.  I’m thinking of a RAII style code in which the dtor runs the clear.  Not sure if that is even possible in tcl.  [ checking ] Nope, maybe not.  Oh well.

  reply	other threads:[~2015-08-25 15:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25  8:17 Christophe Lyon
2015-08-25 15:44 ` Mike Stump [this message]
2015-09-01 14:12   ` Christophe Lyon
2015-09-02 14:02     ` Christophe Lyon
2015-09-03 11:36       ` H.J. Lu
2015-09-03 15:10         ` Christophe Lyon
2015-09-04 11:19           ` H.J. Lu
2015-09-04 11:28             ` H.J. Lu
2015-09-04 12:13               ` H.J. Lu
2015-09-04 12:35                 ` H.J. Lu
2015-09-04 13:21                   ` Christophe Lyon
2015-09-04 14:21                     ` H.J. Lu
2015-09-04 14:54                       ` Christophe Lyon
2015-09-04 14:59                         ` H.J. Lu
2015-09-04 15:02                           ` Christophe Lyon
2015-09-04 15:16                             ` H.J. Lu
2015-09-04 19:29                               ` Mike Stump
2015-08-25 20:28 ` Jeff Law

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=14DA89C6-4F95-4A90-847A-6B6E6909475A@comcast.net \
    --to=mikestump@comcast.net \
    --cc=christophe.lyon@linaro.org \
    --cc=gcc-patches@gcc.gnu.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).