Message ID | 547F1A75.2090603@arm.com |
---|---|
State | New |
Headers | show |
On 12/03/14 07:13, Kyrill Tkachov wrote: > Hi all, > > The check for the tiny memory model is something that is called > frequently on aarch64 testing > since we use it to prune relocation truncation errors in the testsuite. > Therefore it makes sense to cached the result. > I've done this in a similar way to how check_effective_target_vect_shift > does it. > > Testsuite runs fine with this patch. > > Ok for trunk? > > Thanks, > Kyrill > > 2014-12-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com> > > * lib/target-supports.exp (check_effective_target_tiny): Cache > predicate value. OK. jeff
On Dec 3, 2014, at 6:13 AM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote: > > The check for the tiny memory model is something that is called frequently on aarch64 testing > since we use it to prune relocation truncation errors in the testsuite. > Therefore it makes sense to cached the result. > I've done this in a similar way to how check_effective_target_vect_shift does it. > > Testsuite runs fine with this patch. > > Ok for trunk? Ok. I’d remove the verbose calls. You’re done developing, and they just slow things down. :-)
commit 607dd84000612dc6845070ecb211bc8ceb2cb6ba Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com> Date: Mon Dec 1 14:00:40 2014 +0000 [testsuite] Cached check for tiny memory model diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ac04d95..19f512d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6053,11 +6053,20 @@ proc check_effective_target_fenv_exceptions {} { } proc check_effective_target_tiny {} { - if { [istarget aarch64*-*-*] - && [check_effective_target_aarch64_tiny] } { - return 1 + global et_target_tiny_saved + + if [info exists et_target_tine_saved] { + verbose "check_effective_target_tiny: using cached result" 2 + } else { + set et_target_tiny_saved 0 + if { [istarget aarch64*-*-*] + && [check_effective_target_aarch64_tiny] } { + set et_target_tiny_saved 1 + } } - return 0 + + verbose "check_effective_target_tiny: returning $et_target_tiny_saved" 2 + return $et_target_tiny_saved } # Return 1 if LOGICAL_OP_NON_SHORT_CIRCUIT is set to 0 for the current target.