[testsuite] Cache return value of check_effective_target_tiny
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 4 Dec 2014 09:31:00 +0000 (09:31 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 4 Dec 2014 09:31:00 +0000 (09:31 +0000)
* lib/target-supports.exp (check_effective_target_tiny): Cache
predicate value.

From-SVN: r218344

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 03fd90203bfc6476ee4783b4be735955d1084fc2..477600cc278943eb7c3f9b9094afbb1f4f4e5d42 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * lib/target-supports.exp (check_effective_target_tiny): Cache
+       predicate value.
+
 2014-12-04  Jack Howarth  <howarth@bromo.med.uc.edu>
        
        PR testsuite/64145
index ac04d95f7c5131b3a7f3bb68d8ba01b915aa050a..e960e12cd8081082905657367130fa3ce400965b 100644 (file)
@@ -6053,11 +6053,19 @@ 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
+
+    return $et_target_tiny_saved
 }
 
 # Return 1 if LOGICAL_OP_NON_SHORT_CIRCUIT is set to 0 for the current target.