Fix `LLVM_ENABLE_MODULES=On` build

for commit 480936e741.
This commit is contained in:
Yuanfang Chen 2020-12-29 23:15:03 -08:00
parent 453b6aadce
commit 277ebe46c6
4 changed files with 12 additions and 10 deletions

View File

@ -49,6 +49,7 @@
#include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h" #include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"
#include "llvm/Transforms/Scalar/MergeICmps.h" #include "llvm/Transforms/Scalar/MergeICmps.h"
#include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h" #include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h"
#include "llvm/Transforms/Scalar/ScalarizeMaskedMemIntrin.h"
#include "llvm/Transforms/Utils.h" #include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h" #include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
#include "llvm/Transforms/Utils/LowerInvoke.h" #include "llvm/Transforms/Utils/LowerInvoke.h"

View File

@ -44,6 +44,7 @@ FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass, (false))
FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass, (true)) FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass, (true))
FUNCTION_PASS("expand-reductions", ExpandReductionsPass, ()) FUNCTION_PASS("expand-reductions", ExpandReductionsPass, ())
FUNCTION_PASS("lowerinvoke", LowerInvokePass, ()) FUNCTION_PASS("lowerinvoke", LowerInvokePass, ())
FUNCTION_PASS("scalarize-masked-mem-intrin", ScalarizeMaskedMemIntrinPass, ())
FUNCTION_PASS("verify", VerifierPass, ()) FUNCTION_PASS("verify", VerifierPass, ())
#undef FUNCTION_PASS #undef FUNCTION_PASS
@ -103,7 +104,6 @@ MACHINE_FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis, (
DUMMY_FUNCTION_PASS("expandmemcmp", ExpandMemCmpPass, ()) DUMMY_FUNCTION_PASS("expandmemcmp", ExpandMemCmpPass, ())
DUMMY_FUNCTION_PASS("gc-lowering", GCLoweringPass, ()) DUMMY_FUNCTION_PASS("gc-lowering", GCLoweringPass, ())
DUMMY_FUNCTION_PASS("shadow-stack-gc-lowering", ShadowStackGCLoweringPass, ()) DUMMY_FUNCTION_PASS("shadow-stack-gc-lowering", ShadowStackGCLoweringPass, ())
DUMMY_FUNCTION_PASS("scalarize-masked-mem-intrin", ScalarizeMaskedMemIntrinPass, ())
DUMMY_FUNCTION_PASS("sjljehprepare", SjLjEHPreparePass, ()) DUMMY_FUNCTION_PASS("sjljehprepare", SjLjEHPreparePass, ())
DUMMY_FUNCTION_PASS("dwarfehprepare", DwarfEHPass, ()) DUMMY_FUNCTION_PASS("dwarfehprepare", DwarfEHPass, ())
DUMMY_FUNCTION_PASS("winehprepare", WinEHPass, ()) DUMMY_FUNCTION_PASS("winehprepare", WinEHPass, ())

View File

@ -30,6 +30,7 @@ module LLVM_Backend {
// These are intended for (repeated) textual inclusion. // These are intended for (repeated) textual inclusion.
textual header "CodeGen/DIEValue.def" textual header "CodeGen/DIEValue.def"
textual header "CodeGen/MachinePassRegistry.def"
} }
} }

View File

@ -73,15 +73,15 @@ cl::opt<bool> RunNewGVN("enable-newgvn", cl::init(false), cl::Hidden,
// Experimental option to use CFL-AA // Experimental option to use CFL-AA
enum class CFLAAType { None, Steensgaard, Andersen, Both }; enum class CFLAAType { None, Steensgaard, Andersen, Both };
static cl::opt<CFLAAType> static cl::opt<::CFLAAType>
UseCFLAA("use-cfl-aa", cl::init(CFLAAType::None), cl::Hidden, UseCFLAA("use-cfl-aa", cl::init(::CFLAAType::None), cl::Hidden,
cl::desc("Enable the new, experimental CFL alias analysis"), cl::desc("Enable the new, experimental CFL alias analysis"),
cl::values(clEnumValN(CFLAAType::None, "none", "Disable CFL-AA"), cl::values(clEnumValN(::CFLAAType::None, "none", "Disable CFL-AA"),
clEnumValN(CFLAAType::Steensgaard, "steens", clEnumValN(::CFLAAType::Steensgaard, "steens",
"Enable unification-based CFL-AA"), "Enable unification-based CFL-AA"),
clEnumValN(CFLAAType::Andersen, "anders", clEnumValN(::CFLAAType::Andersen, "anders",
"Enable inclusion-based CFL-AA"), "Enable inclusion-based CFL-AA"),
clEnumValN(CFLAAType::Both, "both", clEnumValN(::CFLAAType::Both, "both",
"Enable both variants of CFL-AA"))); "Enable both variants of CFL-AA")));
static cl::opt<bool> EnableLoopInterchange( static cl::opt<bool> EnableLoopInterchange(
@ -276,13 +276,13 @@ void PassManagerBuilder::addExtensionsToPM(ExtensionPointTy ETy,
void PassManagerBuilder::addInitialAliasAnalysisPasses( void PassManagerBuilder::addInitialAliasAnalysisPasses(
legacy::PassManagerBase &PM) const { legacy::PassManagerBase &PM) const {
switch (UseCFLAA) { switch (UseCFLAA) {
case CFLAAType::Steensgaard: case ::CFLAAType::Steensgaard:
PM.add(createCFLSteensAAWrapperPass()); PM.add(createCFLSteensAAWrapperPass());
break; break;
case CFLAAType::Andersen: case ::CFLAAType::Andersen:
PM.add(createCFLAndersAAWrapperPass()); PM.add(createCFLAndersAAWrapperPass());
break; break;
case CFLAAType::Both: case ::CFLAAType::Both:
PM.add(createCFLSteensAAWrapperPass()); PM.add(createCFLSteensAAWrapperPass());
PM.add(createCFLAndersAAWrapperPass()); PM.add(createCFLAndersAAWrapperPass());
break; break;