diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -2823,6 +2823,12 @@ #define CGSSC_ANALYSIS(NAME, CREATE_PASS) \ if (PassName == NAME) \ return true; +#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \ + if (PassName == NAME) \ + return true; +#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \ + if (PassName == NAME) \ + return true; #include "PassRegistry.def" return false; } diff --git a/llvm/test/Analysis/GlobalsModRef/no-escape.ll b/llvm/test/Analysis/GlobalsModRef/no-escape.ll --- a/llvm/test/Analysis/GlobalsModRef/no-escape.ll +++ b/llvm/test/Analysis/GlobalsModRef/no-escape.ll @@ -1,4 +1,5 @@ -; RUN: opt < %s -basic-aa -globals-aa -S -licm | FileCheck %s +; RUN: opt < %s -basic-aa -globals-aa -S -licm -enable-new-pm=0 | FileCheck %s +; RUN: opt < %s -basic-aa -globals-aa -S -licm -enable-new-pm=1 | FileCheck %s target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.10.0" diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp --- a/llvm/tools/opt/NewPMDriver.cpp +++ b/llvm/tools/opt/NewPMDriver.cpp @@ -336,15 +336,12 @@ } // For compatibility with legacy pass manager. // Alias analyses are not specially specified when using the legacy PM. - SmallVector NonAAPasses; for (auto PassName : Passes) { if (PB.isAAPassName(PassName)) { if (auto Err = PB.parseAAPipeline(AA, PassName)) { errs() << Arg0 << ": " << toString(std::move(Err)) << "\n"; return false; } - } else { - NonAAPasses.push_back(PassName); } } // For compatibility with the legacy PM AA pipeline. @@ -389,7 +386,7 @@ return false; } } - for (auto PassName : NonAAPasses) { + for (auto PassName : Passes) { std::string ModifiedPassName(PassName.begin(), PassName.end()); if (PB.isAnalysisPassName(PassName)) ModifiedPassName = "require<" + ModifiedPassName + ">";