[PATCH] D87664: [NewPM][opt] Fix -globals-aa not being recognized as alias analysis in NPM
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 18:40:32 PDT 2020
aeubanks created this revision.
aeubanks added reviewers: ychen, asbirlea.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks requested review of this revision.
Was missing MODULE_ALIAS_ANALYSIS, previously only FUNCTION_ALIAS_ANALYSIS was taken into account.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87664
Files:
llvm/lib/Passes/PassBuilder.cpp
llvm/test/Analysis/GlobalsModRef/comdat-ipo.ll
Index: llvm/test/Analysis/GlobalsModRef/comdat-ipo.ll
===================================================================
--- llvm/test/Analysis/GlobalsModRef/comdat-ipo.ll
+++ llvm/test/Analysis/GlobalsModRef/comdat-ipo.ll
@@ -1,4 +1,5 @@
; RUN: opt < %s -basic-aa -globals-aa -gvn -S | FileCheck %s
+; RUN: opt < %s -basic-aa -globals-aa -gvn -enable-new-pm=1 -S | FileCheck %s
; See PR26774
Index: llvm/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/lib/Passes/PassBuilder.cpp
+++ llvm/lib/Passes/PassBuilder.cpp
@@ -2787,6 +2787,9 @@
}
bool PassBuilder::isAAPassName(StringRef PassName) {
+#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
+ if (PassName == NAME) \
+ return true;
#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
if (PassName == NAME) \
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87664.291755.patch
Type: text/x-patch
Size: 1024 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200915/7f6690aa/attachment.bin>
More information about the llvm-commits
mailing list