From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22514 invoked by alias); 2 Sep 2015 14:02:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22504 invoked by uid 89); 2 Sep 2015 14:02:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f172.google.com Received: from mail-qk0-f172.google.com (HELO mail-qk0-f172.google.com) (209.85.220.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 02 Sep 2015 14:02:47 +0000 Received: by qkcf65 with SMTP id f65so5733128qkc.3 for ; Wed, 02 Sep 2015 07:02:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xvjM0H1ZdWTyvnWkmbJzqi70zAZ+1/hjD+G3UY1VhXU=; b=JCsZbrMalEfI+idHlCHnmfd1XSW6okS8ZvwNIz2wpSnl9hp1SE9570e0hqy+EiAcd8 c1NwzQHcb/ycpn15CLqoHv4QBm9nsFOh9AMSkU0RFFrMojpbNCFw3Uv5xSACKmFQjUIV isF1371exd9oXCVzyPxJlcl7oxbdcfGMIVwtBoZzMPCNh5C8LHgbBg/acSQk+a+H6cgU YzSRMt5aC7RbkUUSYvEO/NpMr/1B5zaTVg/VUIYoD8kY4KTuwcF6DsHDow8R49Urwopx W6/syePfB+RZDXjUbSUXhrci2oEtHztgTJoeEJXDglHKbt2FpKt+VvOaMN+xuCxboxFn ZIyw== X-Gm-Message-State: ALoCoQlnxipS8coJCQMj5AdUno0O4/jjzo01xJkSm1mVvZM085yhVZBbrdjuHLbJE4jsrwPv8msP MIME-Version: 1.0 X-Received: by 10.55.19.201 with SMTP id 70mr27408349qkt.103.1441202565220; Wed, 02 Sep 2015 07:02:45 -0700 (PDT) Received: by 10.140.96.71 with HTTP; Wed, 2 Sep 2015 07:02:45 -0700 (PDT) In-Reply-To: References: <14DA89C6-4F95-4A90-847A-6B6E6909475A@comcast.net> Date: Wed, 02 Sep 2015 14:02:00 -0000 Message-ID: Subject: Re: [testsuite] Clean up effective_target cache From: Christophe Lyon To: Mike Stump Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00162.txt.bz2 On 1 September 2015 at 16:04, Christophe Lyon wrote: > On 25 August 2015 at 17:31, Mike Stump wrote: >> On Aug 25, 2015, at 1:14 AM, Christophe Lyon 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 ALWAY= S_CXXFLAGS or TEST_ALWAYS_FLAGS then they should do a clear_effective_targe= t_cache at the end as the target cache can make decisions based upon the fl= ags, and those decisions need to be redone when the flags change would be n= ice. >> >> I do wonder, do we need to reexamine when setting the flags? I=E2=80=99= m thinking of a sequence like: non-thumb default, is_thumb, set flags (thum= b), is_thumb. Anyway, safe to punt this until someone discovers it or is r= easonable sure it happens. >> >> Anyway, all looks good. Ok. >> > Here is what I have committed (r227372). Hmmm, in fact this was r227401. > > I updated the comment before clear_effective_target_cache, and copied > the directive you suggested above. > I also added a test to check if $et_prop_list exists before clearing > (there were error messages otherwise). > > Christophe. > >>> 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 setti= ng and unsetting would come in cleared, and if they didn=E2=80=99t, it shou= ld be roughly the same exact state, meaning, no clearing necessary. I thin= k it is safe to punt this until someone finds a bug or can see a way that i= t would matter. I also don=E2=80=99t think it would hurt to clear, if some= one wanted to refactor the code a bit and make the clearing and the cleanup= a little more automatic. I=E2=80=99m thinking of a RAII style code in whi= ch the dtor runs the clear. Not sure if that is even possible in tcl. [ c= hecking ] Nope, maybe not. Oh well.