[PATCH] D82998: [BasicAA] Enable -basic-aa-recphi by default
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 15:09:18 PDT 2020
dmgreen created this revision.
dmgreen added reviewers: hfinkel, efriedma, fhahn, tobiasvk.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
dmgreen added a parent revision: D82987: [BasicAA] Fix recursive phi MustAlias calculations.
dmgreen updated this revision to Diff 274933.
dmgreen added a comment.
Fixup basic-aa argument.
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. It should not have an effect on compile time, only adding a couple of extra checks to existing code.
Requires D82987 <https://reviews.llvm.org/D82987>.
https://reviews.llvm.org/D82998
Files:
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/phi-loop.ll
llvm/test/Analysis/BasicAA/recphi.ll
Index: llvm/test/Analysis/BasicAA/recphi.ll
===================================================================
--- llvm/test/Analysis/BasicAA/recphi.ll
+++ 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
Index: llvm/test/Analysis/BasicAA/phi-loop.ll
===================================================================
--- llvm/test/Analysis/BasicAA/phi-loop.ll
+++ 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.
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
===================================================================
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -66,7 +66,7 @@
/// 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82998.274933.patch
Type: text/x-patch
Size: 1598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200701/666260fb/attachment-0001.bin>
More information about the llvm-commits
mailing list