[testsuite] Clean up effective_target cache

H.J. Lu hjl.tools@gmail.com
Fri Sep 4 11:19:00 GMT 2015


On Thu, Sep 3, 2015 at 8:03 AM, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
> On 3 September 2015 at 13:31, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Wed, Sep 2, 2015 at 7:02 AM, Christophe Lyon
>> <christophe.lyon@linaro.org> wrote:
>>> On 1 September 2015 at 16:04, Christophe Lyon
>>> <christophe.lyon@linaro.org> wrote:
>>>> On 25 August 2015 at 17:31, Mike Stump <mikestump@comcast.net> wrote:
>>>>> 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.
>>>>>
>>>> Here is what I have committed (r227372).
>>>
>>> Hmmm, in fact this was r227401.
>>>
>>
>> It caused:
>>
>> ERROR: can't unset "et_cache(arm_neon_ok,value)": no such element in array
>> ERROR: can't unset "et_cache(arm_neon_ok,value)": no such element in array
>> ERROR: can't unset "et_cache(arm_neon_ok,value)": no such element in array
>> ERROR: can't unset "et_cache(dfp,value)": no such element in array
>> ERROR: can't unset "et_cache(fsanitize_address,value)": no such element in array
>> ERROR: can't unset "et_cache(ia32,value)": no such element in array
>> ERROR: can't unset "et_cache(ia32,value)": no such element in array
>> ERROR: can't unset "et_cache(ia32,value)": no such element in array
>> ERROR: can't unset "et_cache(ia32,value)": no such element in array
>> ERROR: can't unset "et_cache(ia32,value)": no such element in array
>> ERROR: can't unset "et_cache(ilp32,value)": no such element in array
>> ERROR: can't unset "et_cache(ilp32,value)": no such element in array
>> ERROR: can't unset "et_cache(ilp32,value)": no such element in array
>> ERROR: can't unset "et_cache(ilp32,value)": no such element in array
>> ERROR: can't unset "et_cache(label_values,value)": no such element in array
>> ERROR: can't unset "et_cache(lp64,value)": no such element in array
>> ERROR: can't unset "et_cache(lp64,value)": no such element in array
>> ERROR: can't unset "et_cache(lp64,value)": no such element in array
>> ERROR: can't unset "et_cache(ptr32plus,value)": no such element in array
>> ERROR: can't unset "et_cache(ptr32plus,value)": no such element in array
>> ...
>>
>> on Linux/x86-64:
>>
>> https://gcc.gnu.org/ml/gcc-testresults/2015-09/msg00167.html
>>
>
> I'll have a look.
> That's the configuration I used to check before committing, but I am
> going to re-check.

proc check_cached_effective_target { prop args } {
    global et_cache
    global et_prop_list

    set target [current_target_name]
    if {![info exists et_cache($prop,target)]
        || $et_cache($prop,target) != $target} {
        verbose "check_cached_effective_target $prop: checking $target" 2
        set et_cache($prop,target) $target
        set et_cache($prop,value) [uplevel eval $args]
        lappend et_prop_list $prop
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Aren't you appending $pop to et_prop_list even if it may be already
on the list?

        verbose "check_cached_effective_target cached list is now:
$et_prop_list" 2
    }
    set value $et_cache($prop,value)
    verbose "check_cached_effective_target $prop: returning $value for
$target" 2
    return $value
}


-- 
H.J.



More information about the Gcc-patches mailing list