]> granicus.if.org Git - llvm/commitdiff
[Attributor][NFCI] Introduce tight iteration bounds in the tests
authorJohannes Doerfert <jdoerfert@anl.gov>
Wed, 21 Aug 2019 21:42:46 +0000 (21:42 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Wed, 21 Aug 2019 21:42:46 +0000 (21:42 +0000)
Summary:
To be able to track how many iterations we need to manifest all
information we check for we now make the maximum iteration count
explicit. The count is set tightly now and should be kept that way.

Reviewers: uenoku, sstefan1

Subscribers: bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66554

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369586 91177308-0d34-0410-b5e6-96231b3b80d8

15 files changed:
test/Transforms/FunctionAttrs/align.ll
test/Transforms/FunctionAttrs/arg_nocapture.ll
test/Transforms/FunctionAttrs/arg_returned.ll
test/Transforms/FunctionAttrs/dereferenceable.ll
test/Transforms/FunctionAttrs/fn_noreturn.ll
test/Transforms/FunctionAttrs/liveness.ll
test/Transforms/FunctionAttrs/noalias_returned.ll
test/Transforms/FunctionAttrs/nofree-attributor.ll
test/Transforms/FunctionAttrs/nonnull.ll
test/Transforms/FunctionAttrs/noreturn_async.ll
test/Transforms/FunctionAttrs/noreturn_sync.ll
test/Transforms/FunctionAttrs/nosync.ll
test/Transforms/FunctionAttrs/nounwind.ll
test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll
test/Transforms/FunctionAttrs/willreturn.ll

index 88b3e1da2bb7151dbe1e9fc2c7eba3b4fcd65147..54dbb3614e6905e614c7f510b123c783fc07db97 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -attributor -attributor-disable=false -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
+; RUN: opt -attributor -attributor-disable=false -attributor-max-iterations=17 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
index 7a20b1346af55e59f82f770ae73a3dc7f16d63fc..33a68cd0208fb286029e4560729a2e07a6afa4a2 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -functionattrs -attributor -attributor-disable=false -S < %s | FileCheck %s
+; RUN: opt -functionattrs -attributor -attributor-disable=false -attributor-max-iterations=19 -S < %s | FileCheck %s
 ;
 ; Test cases specifically designed for the "no-capture" argument attribute.
 ; We use FIXME's to indicate problems and missing attributes.
index fac1fe50e7d771192ff0f43bdcdfac1151d02f96..091104357fc3957ef817d02795af0bd95d9190b0 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: opt -functionattrs -S < %s | FileCheck %s --check-prefix=FNATTR
-; RUN: opt -attributor -attributor-disable=false -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
+; RUN: opt -attributor -attributor-disable=false -attributor-max-iterations=26 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
 ; RUN: opt -attributor -attributor-disable=false -functionattrs -S < %s | FileCheck %s --check-prefix=BOTH
 ;
 ; Test cases specifically designed for the "returned" argument attribute.
index a9a2c26498a0430615adb2fda51a2fb6b8d6fdf1..f75f9203e846fbc13c0112abdcc8964466ba8392 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -attributor --attributor-disable=false -S < %s | FileCheck %s --check-prefixes=ATTRIBUTOR
+; RUN: opt -attributor --attributor-disable=false -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=ATTRIBUTOR
 
 
 ; TEST 1
index 885c5af4527aff76a1640a4ec844d32c03e6996d..818f68058d90b88666571240dc223ed1fdadf7e8 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -functionattrs -attributor -attributor-disable=false -S < %s | FileCheck %s
+; RUN: opt -functionattrs -attributor -attributor-disable=false -attributor-max-iterations=3 -S < %s | FileCheck %s
 ;
 ; Test cases specifically designed for the "no-return" function attribute.
 ; We use FIXME's to indicate problems and missing attributes.
index d068baeb02676eb5bd608171effc133f9fe46740..45e786c11edd3754dda2be0fb6366b346ab5af1e 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -attributor --attributor-disable=false -S < %s | FileCheck %s
+; RUN: opt -attributor --attributor-disable=false -attributor-max-iterations=6 -S < %s | FileCheck %s
 
 declare void @no_return_call() nofree noreturn nounwind readnone
 
index 2cffec7f2e7ce605d528f5ed1dfc6aa8eec7a892..8e0d983cf088791bbcf36a0830955a2eb1454f5e 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -S -attributor -attributor-disable=false < %s | FileCheck %s
+; RUN: opt -S -attributor -attributor-disable=false -attributor-max-iterations=8 < %s | FileCheck %s
 
 ; TEST 1 - negative.
 
index 8ccb52fac6d704d8f149dd70a4c62016efffa5f5..778cd30a8fffab8cc7c845584b9f1d3c8bdb8036 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: opt -functionattrs --disable-nofree-inference=false -S < %s | FileCheck %s --check-prefix=FNATTR
-; RUN: opt -attributor --attributor-disable=false -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
+; RUN: opt -attributor --attributor-disable=false -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
index 5ea37f5bf991364eaf8c66c86997baf87165aa77..58fe0a76a3674c305ac0559ac3cb9d2d00eef12c 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: opt -S -functionattrs -enable-nonnull-arg-prop %s | FileCheck %s --check-prefixes=BOTH,FNATTR
 ; RUN: opt -S -passes=function-attrs -enable-nonnull-arg-prop %s | FileCheck %s --check-prefixes=BOTH,FNATTR
-; RUN: opt -attributor --attributor-disable=false -S < %s | FileCheck %s --check-prefixes=BOTH,ATTRIBUTOR
+; RUN: opt -attributor --attributor-disable=false -attributor-max-iterations=12 -S < %s | FileCheck %s --check-prefixes=BOTH,ATTRIBUTOR
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
index e2f22a111cf76056158479fcee76868d763f8611..0b6c44ff267564f8b6ea3e31e70618dc136727b2 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -functionattrs -attributor -attributor-disable=false -S < %s | FileCheck %s
+; RUN: opt -functionattrs -attributor -attributor-disable=false -attributor-max-iterations=5 -S < %s | FileCheck %s
 ;
 ; This file is the same as noreturn_sync.ll but with a personality which
 ; indicates that the exception handler *can* catch asynchronous exceptions. As
index 26cabb8f817137ce5f00d16387c7ce4ab66a98ab..71a9215674350d1dea23e10c3106dbd1e04b24e7 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -functionattrs -attributor -attributor-disable=false -S < %s | FileCheck %s
+; RUN: opt -functionattrs -attributor -attributor-disable=false -attributor-max-iterations=7 -S < %s | FileCheck %s
 ;
 ; This file is the same as noreturn_async.ll but with a personality which
 ; indicates that the exception handler *cannot* catch asynchronous exceptions.
index c86facb819215c8306960ea236a49292d0d8ed6a..1966cbb5fbf8553c6dfe000b757ed0e8b6367b61 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: opt -functionattrs -S < %s | FileCheck %s --check-prefix=FNATTR
-; RUN: opt -attributor -attributor-disable=false -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
+; RUN: opt -attributor -attributor-disable=false -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
 ; Test cases designed for the nosync function attribute.
index 1c9d019960cb0a826d51d8b59d1961bc15984880..02527892f01d97a0f4aba53992788a697fde4990 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -functionattrs -S | FileCheck %s
-; RUN: opt < %s -attributor -attributor-disable=false -S | FileCheck %s --check-prefix=ATTRIBUTOR
+; RUN: opt < %s -attributor -attributor-disable=false -attributor-max-iterations=9 -S | FileCheck %s --check-prefix=ATTRIBUTOR
 
 ; TEST 1
 ; CHECK: Function Attrs: norecurse nounwind readnone
index afc2396994001cfff363ee72c03f55cbc56479c1..ae18e09a4d56cf82bd53c2a115afbd69dea27d93 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -functionattrs -enable-nonnull-arg-prop -attributor -attributor-disable=false -attributor-max-iterations=33 -S < %s | FileCheck %s
+; RUN: opt -functionattrs -enable-nonnull-arg-prop -attributor -attributor-disable=false -attributor-max-iterations=29 -S < %s | FileCheck %s
 ;
 ; This is an evolved example to stress test SCC parameter attribute propagation.
 ; The SCC in this test is made up of the following six function, three of which
index 8ddcf7e7e15fb4a2ec900e7e5a6344939d9620b0..9190788709f0b158a483f528195479dda81c34ca 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: opt -functionattrs -S < %s | FileCheck %s --check-prefix=FNATTR
-; RUN: opt -attributor --attributor-disable=false -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
+; RUN: opt -attributor --attributor-disable=false -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
 
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"