From 2888b0c825ab305570722e25d5c131cbe42c958a Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 21 Aug 2019 21:42:46 +0000 Subject: [PATCH] [Attributor][NFCI] Introduce tight iteration bounds in the tests 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 --- test/Transforms/FunctionAttrs/align.ll | 2 +- test/Transforms/FunctionAttrs/arg_nocapture.ll | 2 +- test/Transforms/FunctionAttrs/arg_returned.ll | 2 +- test/Transforms/FunctionAttrs/dereferenceable.ll | 2 +- test/Transforms/FunctionAttrs/fn_noreturn.ll | 2 +- test/Transforms/FunctionAttrs/liveness.ll | 2 +- test/Transforms/FunctionAttrs/noalias_returned.ll | 2 +- test/Transforms/FunctionAttrs/nofree-attributor.ll | 2 +- test/Transforms/FunctionAttrs/nonnull.ll | 2 +- test/Transforms/FunctionAttrs/noreturn_async.ll | 2 +- test/Transforms/FunctionAttrs/noreturn_sync.ll | 2 +- test/Transforms/FunctionAttrs/nosync.ll | 2 +- test/Transforms/FunctionAttrs/nounwind.ll | 2 +- .../FunctionAttrs/read_write_returned_arguments_scc.ll | 2 +- test/Transforms/FunctionAttrs/willreturn.ll | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/Transforms/FunctionAttrs/align.ll b/test/Transforms/FunctionAttrs/align.ll index 88b3e1da2bb..54dbb3614e6 100644 --- a/test/Transforms/FunctionAttrs/align.ll +++ b/test/Transforms/FunctionAttrs/align.ll @@ -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" diff --git a/test/Transforms/FunctionAttrs/arg_nocapture.ll b/test/Transforms/FunctionAttrs/arg_nocapture.ll index 7a20b1346af..33a68cd0208 100644 --- a/test/Transforms/FunctionAttrs/arg_nocapture.ll +++ b/test/Transforms/FunctionAttrs/arg_nocapture.ll @@ -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. diff --git a/test/Transforms/FunctionAttrs/arg_returned.ll b/test/Transforms/FunctionAttrs/arg_returned.ll index fac1fe50e7d..091104357fc 100644 --- a/test/Transforms/FunctionAttrs/arg_returned.ll +++ b/test/Transforms/FunctionAttrs/arg_returned.ll @@ -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. diff --git a/test/Transforms/FunctionAttrs/dereferenceable.ll b/test/Transforms/FunctionAttrs/dereferenceable.ll index a9a2c26498a..f75f9203e84 100644 --- a/test/Transforms/FunctionAttrs/dereferenceable.ll +++ b/test/Transforms/FunctionAttrs/dereferenceable.ll @@ -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 diff --git a/test/Transforms/FunctionAttrs/fn_noreturn.ll b/test/Transforms/FunctionAttrs/fn_noreturn.ll index 885c5af4527..818f68058d9 100644 --- a/test/Transforms/FunctionAttrs/fn_noreturn.ll +++ b/test/Transforms/FunctionAttrs/fn_noreturn.ll @@ -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. diff --git a/test/Transforms/FunctionAttrs/liveness.ll b/test/Transforms/FunctionAttrs/liveness.ll index d068baeb026..45e786c11ed 100644 --- a/test/Transforms/FunctionAttrs/liveness.ll +++ b/test/Transforms/FunctionAttrs/liveness.ll @@ -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 diff --git a/test/Transforms/FunctionAttrs/noalias_returned.ll b/test/Transforms/FunctionAttrs/noalias_returned.ll index 2cffec7f2e7..8e0d983cf08 100644 --- a/test/Transforms/FunctionAttrs/noalias_returned.ll +++ b/test/Transforms/FunctionAttrs/noalias_returned.ll @@ -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. diff --git a/test/Transforms/FunctionAttrs/nofree-attributor.ll b/test/Transforms/FunctionAttrs/nofree-attributor.ll index 8ccb52fac6d..778cd30a8ff 100644 --- a/test/Transforms/FunctionAttrs/nofree-attributor.ll +++ b/test/Transforms/FunctionAttrs/nofree-attributor.ll @@ -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" diff --git a/test/Transforms/FunctionAttrs/nonnull.ll b/test/Transforms/FunctionAttrs/nonnull.ll index 5ea37f5bf99..58fe0a76a36 100644 --- a/test/Transforms/FunctionAttrs/nonnull.ll +++ b/test/Transforms/FunctionAttrs/nonnull.ll @@ -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" diff --git a/test/Transforms/FunctionAttrs/noreturn_async.ll b/test/Transforms/FunctionAttrs/noreturn_async.ll index e2f22a111cf..0b6c44ff267 100644 --- a/test/Transforms/FunctionAttrs/noreturn_async.ll +++ b/test/Transforms/FunctionAttrs/noreturn_async.ll @@ -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 diff --git a/test/Transforms/FunctionAttrs/noreturn_sync.ll b/test/Transforms/FunctionAttrs/noreturn_sync.ll index 26cabb8f817..71a92156743 100644 --- a/test/Transforms/FunctionAttrs/noreturn_sync.ll +++ b/test/Transforms/FunctionAttrs/noreturn_sync.ll @@ -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. diff --git a/test/Transforms/FunctionAttrs/nosync.ll b/test/Transforms/FunctionAttrs/nosync.ll index c86facb8192..1966cbb5fbf 100644 --- a/test/Transforms/FunctionAttrs/nosync.ll +++ b/test/Transforms/FunctionAttrs/nosync.ll @@ -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. diff --git a/test/Transforms/FunctionAttrs/nounwind.ll b/test/Transforms/FunctionAttrs/nounwind.ll index 1c9d019960c..02527892f01 100644 --- a/test/Transforms/FunctionAttrs/nounwind.ll +++ b/test/Transforms/FunctionAttrs/nounwind.ll @@ -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 diff --git a/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll b/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll index afc23969940..ae18e09a4d5 100644 --- a/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll +++ b/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll @@ -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 diff --git a/test/Transforms/FunctionAttrs/willreturn.ll b/test/Transforms/FunctionAttrs/willreturn.ll index 8ddcf7e7e15..9190788709f 100644 --- a/test/Transforms/FunctionAttrs/willreturn.ll +++ b/test/Transforms/FunctionAttrs/willreturn.ll @@ -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" -- 2.40.0