This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][testsuite] Cache return value of check_effective_target_tiny
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: "mikestump at comcast dot net" <mikestump at comcast dot net>
- Date: Wed, 03 Dec 2014 14:13:09 +0000
- Subject: [PATCH][testsuite] Cache return value of check_effective_target_tiny
- Authentication-results: sourceware.org; auth=none
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.
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.