[PATCH] D86167: [opt][NewPM] Add basic-aa in legacy PM compatibility mode
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 16:59:54 PDT 2020
aeubanks updated this revision to Diff 286687.
aeubanks added a comment.
Add more detail in comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86167/new/
https://reviews.llvm.org/D86167
Files:
llvm/lib/Analysis/AliasAnalysis.cpp
llvm/test/Transforms/SLPVectorizer/X86/limit.ll
llvm/tools/opt/NewPMDriver.cpp
Index: llvm/tools/opt/NewPMDriver.cpp
===================================================================
--- llvm/tools/opt/NewPMDriver.cpp
+++ llvm/tools/opt/NewPMDriver.cpp
@@ -109,6 +109,7 @@
extern cl::opt<std::string> ProfileFile;
extern cl::opt<CSPGOKind> CSPGOKindFlag;
extern cl::opt<std::string> CSProfileGenFile;
+extern cl::opt<bool> DisableBasicAA;
static cl::opt<std::string>
ProfileRemappingFile("profile-remapping-file",
@@ -346,6 +347,15 @@
NonAAPasses.push_back(PassName);
}
}
+ // For compatibility with the legacy PM AA pipeline.
+ // AAResultsWrapperPass by default provides basic-aa in the legacy PM
+ // unless -disable-basic-aa is specified.
+ if (!Passes.empty() && !DisableBasicAA) {
+ if (auto Err = PB.parseAAPipeline(AA, "basic-aa")) {
+ errs() << Arg0 << ": " << toString(std::move(Err)) << "\n";
+ return false;
+ }
+ }
LoopAnalysisManager LAM(DebugPM);
FunctionAnalysisManager FAM(DebugPM);
Index: llvm/test/Transforms/SLPVectorizer/X86/limit.ll
===================================================================
--- llvm/test/Transforms/SLPVectorizer/X86/limit.ll
+++ llvm/test/Transforms/SLPVectorizer/X86/limit.ll
@@ -1,5 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -slp-vectorizer -S | FileCheck %s
+; RUN: opt < %s -slp-vectorizer -enable-new-pm -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
Index: llvm/lib/Analysis/AliasAnalysis.cpp
===================================================================
--- llvm/lib/Analysis/AliasAnalysis.cpp
+++ llvm/lib/Analysis/AliasAnalysis.cpp
@@ -58,8 +58,7 @@
/// Allow disabling BasicAA from the AA results. This is particularly useful
/// when testing to isolate a single AA implementation.
-static cl::opt<bool> DisableBasicAA("disable-basic-aa", cl::Hidden,
- cl::init(false));
+cl::opt<bool> DisableBasicAA("disable-basic-aa", cl::Hidden, cl::init(false));
AAResults::AAResults(AAResults &&Arg)
: TLI(Arg.TLI), AAs(std::move(Arg.AAs)), AADeps(std::move(Arg.AADeps)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86167.286687.patch
Type: text/x-patch
Size: 2189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/6bdf8ef7/attachment.bin>
More information about the llvm-commits
mailing list