[llvm] af839a9 - [BasicAA] Enable -basic-aa-recphi by default
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 06:55:09 PDT 2020
Author: David Green
Date: 2020-07-09T14:54:53+01:00
New Revision: af839a96187e3538d63ad57571e4bdf01e2b15c5
URL: https://github.com/llvm/llvm-project/commit/af839a96187e3538d63ad57571e4bdf01e2b15c5
DIFF: https://github.com/llvm/llvm-project/commit/af839a96187e3538d63ad57571e4bdf01e2b15c5.diff
LOG: [BasicAA] Enable -basic-aa-recphi by default
This option was added a while back, to help improve AA around pointer
phi loops. It looks for phi(gep(phi, const), x) loops, checking if x can
then prove more precise aliasing info.
Differential Revision: https://reviews.llvm.org/D82998
Added:
Modified:
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/phi-loop.ll
llvm/test/Analysis/BasicAA/recphi.ll
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index 74664098ce1d..5574d3f5db6a 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -66,7 +66,7 @@ using namespace llvm;
/// Enable analysis of recursive PHI nodes.
static cl::opt<bool> EnableRecPhiAnalysis("basic-aa-recphi", cl::Hidden,
- cl::init(false));
+ cl::init(true));
/// By default, even on 32-bit architectures we use 64-bit integers for
/// calculations. This will allow us to more-aggressively decompose indexing
diff --git a/llvm/test/Analysis/BasicAA/phi-loop.ll b/llvm/test/Analysis/BasicAA/phi-loop.ll
index db3023c6560d..e54752a9223f 100644
--- a/llvm/test/Analysis/BasicAA/phi-loop.ll
+++ b/llvm/test/Analysis/BasicAA/phi-loop.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -basic-aa -basic-aa-recphi=1 -gvn -S | FileCheck %s
+; RUN: opt < %s -basic-aa -gvn -S | FileCheck %s
;
; Check that section->word_ofs doesn't get reloaded in every iteration of the
; for loop.
diff --git a/llvm/test/Analysis/BasicAA/recphi.ll b/llvm/test/Analysis/BasicAA/recphi.ll
index 130058c74560..bdd85c8f0e6c 100644
--- a/llvm/test/Analysis/BasicAA/recphi.ll
+++ b/llvm/test/Analysis/BasicAA/recphi.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -basic-aa -aa-eval -print-all-alias-modref-info -basic-aa-recphi -disable-output 2>&1 | FileCheck %s
+; RUN: opt < %s -basic-aa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
; CHECK-LABEL: Function: simple: 5 pointers, 0 call sites
; CHECK: NoAlias: float* %src1, float* %src2
More information about the llvm-commits
mailing list