diff options
author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2014-01-03 05:47:03 +0000 |
---|---|---|
committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2014-01-03 05:47:03 +0000 |
commit | 3036182e99f4efe74aa1309963271004ed71823b (patch) | |
tree | ecd0e35d8e2ae41b474760ebf787dd62dade5bd2 /test/Analysis | |
parent | 74a990b16c0206a6d1caa4dbac9f965b690614da (diff) | |
download | llvm-3036182e99f4efe74aa1309963271004ed71823b.tar.gz llvm-3036182e99f4efe74aa1309963271004ed71823b.tar.bz2 llvm-3036182e99f4efe74aa1309963271004ed71823b.tar.xz |
BasicAA: Use reachabilty instead of dominance for checking value equality in phi
cycles
This allows the value equality check to work even if we don't have a dominator
tree. Also add some more comments.
I was worried about compile time impacts and did not implement reachability but
used the dominance check in the initial patch. The trade-off was that the
dominator tree was required.
The llvm utility function isPotentiallyReachable cuts off the recursive search
after 32 visits. Testing did not show any compile time regressions showing my
worries unjustfied.
No compile time or performance regressions at O3 -flto -mavx on test-suite +
externals.
Addresses review comments from r198290.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll | 2 | ||||
-rw-r--r-- | test/Analysis/BasicAA/phi-aa.ll | 7 | ||||
-rw-r--r-- | test/Analysis/BasicAA/phi-spec-order.ll | 2 | ||||
-rw-r--r-- | test/Analysis/GlobalsModRef/aliastest.ll | 2 |
4 files changed, 3 insertions, 10 deletions
diff --git a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll index c6a9cd9a10..06a804c392 100644 --- a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll +++ b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -domtree -basicaa -aa-eval -disable-output 2>&1 | FileCheck %s +; RUN: opt < %s -basicaa -aa-eval -disable-output 2>&1 | FileCheck %s ; TEST that A[1][0] may alias A[0][i]. target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" diff --git a/test/Analysis/BasicAA/phi-aa.ll b/test/Analysis/BasicAA/phi-aa.ll index ed2d23e3ad..74279e1c4c 100644 --- a/test/Analysis/BasicAA/phi-aa.ll +++ b/test/Analysis/BasicAA/phi-aa.ll @@ -1,5 +1,4 @@ ; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s -; RUN: opt < %s -domtree -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s --check-prefix=DOM target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @@ -12,9 +11,6 @@ target triple = "x86_64-unknown-linux-gnu" ; CHECK-LABEL: foo ; CHECK: NoAlias: i32* %P, i32* @Z -; DOM-LABEL: foo -; DOM: NoAlias: i32* %P, i32* @Z - define void @foo(i32 %cond) nounwind { entry: %"alloca point" = bitcast i32 0 to i32 @@ -44,9 +40,6 @@ return: ; CHECK-LABEL: pr18068 ; CHECK: MayAlias: i32* %0, i32* %arrayidx5 -; DOM-LABEL: pr18068 -; DOM: MayAlias: i32* %0, i32* %arrayidx5 - define i32 @pr18068(i32* %jj7, i32* %j) { entry: %oa5 = alloca [100 x i32], align 16 diff --git a/test/Analysis/BasicAA/phi-spec-order.ll b/test/Analysis/BasicAA/phi-spec-order.ll index 3c9fa92363..4172d0963f 100644 --- a/test/Analysis/BasicAA/phi-spec-order.ll +++ b/test/Analysis/BasicAA/phi-spec-order.ll @@ -1,6 +1,6 @@ target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" target triple = "powerpc64-bgq-linux" -; RUN: opt < %s -domtree -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s @X = external global [16000 x double], align 32 @Y = external global [16000 x double], align 32 diff --git a/test/Analysis/GlobalsModRef/aliastest.ll b/test/Analysis/GlobalsModRef/aliastest.ll index 864c516ec9..4cfed71bfb 100644 --- a/test/Analysis/GlobalsModRef/aliastest.ll +++ b/test/Analysis/GlobalsModRef/aliastest.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -domtree -basicaa -globalsmodref-aa -gvn -S | FileCheck %s +; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s @X = internal global i32 4 ; <i32*> [#uses=1] |