forked from OSchip/llvm-project
[NewPM] Move analysis invalidation/clearing logging to instrumentation
We're trying to move DebugLogging into instrumentation, rather than being part of PassManagers/AnalysisManagers. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D102093
This commit is contained in:
parent
1312852040
commit
6f7131002b
|
@ -1272,10 +1272,10 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager(
|
||||||
PTO.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS;
|
PTO.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS;
|
||||||
PTO.Coroutines = LangOpts.Coroutines;
|
PTO.Coroutines = LangOpts.Coroutines;
|
||||||
|
|
||||||
LoopAnalysisManager LAM(CodeGenOpts.DebugPassManager);
|
LoopAnalysisManager LAM;
|
||||||
FunctionAnalysisManager FAM(CodeGenOpts.DebugPassManager);
|
FunctionAnalysisManager FAM;
|
||||||
CGSCCAnalysisManager CGAM(CodeGenOpts.DebugPassManager);
|
CGSCCAnalysisManager CGAM;
|
||||||
ModuleAnalysisManager MAM(CodeGenOpts.DebugPassManager);
|
ModuleAnalysisManager MAM;
|
||||||
|
|
||||||
PassInstrumentationCallbacks PIC;
|
PassInstrumentationCallbacks PIC;
|
||||||
StandardInstrumentations SI(CodeGenOpts.DebugPassManager);
|
StandardInstrumentations SI(CodeGenOpts.DebugPassManager);
|
||||||
|
|
|
@ -40,11 +40,10 @@ class MachineFunctionAnalysisManager : public AnalysisManager<MachineFunction> {
|
||||||
public:
|
public:
|
||||||
using Base = AnalysisManager<MachineFunction>;
|
using Base = AnalysisManager<MachineFunction>;
|
||||||
|
|
||||||
MachineFunctionAnalysisManager() : Base(false), FAM(nullptr), MAM(nullptr) {}
|
MachineFunctionAnalysisManager() : Base(), FAM(nullptr), MAM(nullptr) {}
|
||||||
MachineFunctionAnalysisManager(FunctionAnalysisManager &FAM,
|
MachineFunctionAnalysisManager(FunctionAnalysisManager &FAM,
|
||||||
ModuleAnalysisManager &MAM,
|
ModuleAnalysisManager &MAM)
|
||||||
bool DebugLogging = false)
|
: Base(), FAM(&FAM), MAM(&MAM) {}
|
||||||
: Base(DebugLogging), FAM(&FAM), MAM(&MAM) {}
|
|
||||||
MachineFunctionAnalysisManager(MachineFunctionAnalysisManager &&) = default;
|
MachineFunctionAnalysisManager(MachineFunctionAnalysisManager &&) = default;
|
||||||
MachineFunctionAnalysisManager &
|
MachineFunctionAnalysisManager &
|
||||||
operator=(MachineFunctionAnalysisManager &&) = default;
|
operator=(MachineFunctionAnalysisManager &&) = default;
|
||||||
|
|
|
@ -81,6 +81,8 @@ public:
|
||||||
using AfterPassInvalidatedFunc = void(StringRef, const PreservedAnalyses &);
|
using AfterPassInvalidatedFunc = void(StringRef, const PreservedAnalyses &);
|
||||||
using BeforeAnalysisFunc = void(StringRef, Any);
|
using BeforeAnalysisFunc = void(StringRef, Any);
|
||||||
using AfterAnalysisFunc = void(StringRef, Any);
|
using AfterAnalysisFunc = void(StringRef, Any);
|
||||||
|
using AnalysisInvalidatedFunc = void(StringRef, Any);
|
||||||
|
using AnalysesClearedFunc = void(StringRef);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PassInstrumentationCallbacks() {}
|
PassInstrumentationCallbacks() {}
|
||||||
|
@ -123,6 +125,16 @@ public:
|
||||||
AfterAnalysisCallbacks.emplace_back(std::move(C));
|
AfterAnalysisCallbacks.emplace_back(std::move(C));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename CallableT>
|
||||||
|
void registerAnalysisInvalidatedCallback(CallableT C) {
|
||||||
|
AnalysisInvalidatedCallbacks.emplace_back(std::move(C));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename CallableT>
|
||||||
|
void registerAnalysesClearedCallback(CallableT C) {
|
||||||
|
AnalysesClearedCallbacks.emplace_back(std::move(C));
|
||||||
|
}
|
||||||
|
|
||||||
/// Add a class name to pass name mapping for use by pass instrumentation.
|
/// Add a class name to pass name mapping for use by pass instrumentation.
|
||||||
void addClassToPassName(StringRef ClassName, StringRef PassName);
|
void addClassToPassName(StringRef ClassName, StringRef PassName);
|
||||||
/// Get the pass name for a given pass class name.
|
/// Get the pass name for a given pass class name.
|
||||||
|
@ -152,6 +164,12 @@ private:
|
||||||
/// These are run on analyses that have been run.
|
/// These are run on analyses that have been run.
|
||||||
SmallVector<llvm::unique_function<AfterAnalysisFunc>, 4>
|
SmallVector<llvm::unique_function<AfterAnalysisFunc>, 4>
|
||||||
AfterAnalysisCallbacks;
|
AfterAnalysisCallbacks;
|
||||||
|
/// These are run on analyses that have been invalidated.
|
||||||
|
SmallVector<llvm::unique_function<AnalysisInvalidatedFunc>, 4>
|
||||||
|
AnalysisInvalidatedCallbacks;
|
||||||
|
/// These are run on analyses that have been cleared.
|
||||||
|
SmallVector<llvm::unique_function<AnalysesClearedFunc>, 4>
|
||||||
|
AnalysesClearedCallbacks;
|
||||||
|
|
||||||
StringMap<std::string> ClassToPassName;
|
StringMap<std::string> ClassToPassName;
|
||||||
};
|
};
|
||||||
|
@ -256,6 +274,24 @@ public:
|
||||||
C(Analysis.name(), llvm::Any(&IR));
|
C(Analysis.name(), llvm::Any(&IR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// AnalysisInvalidated instrumentation point - takes \p Analysis instance
|
||||||
|
/// that has just been invalidated and constant reference to IR it operated
|
||||||
|
/// on.
|
||||||
|
template <typename IRUnitT, typename PassT>
|
||||||
|
void runAnalysisInvalidated(const PassT &Analysis, const IRUnitT &IR) const {
|
||||||
|
if (Callbacks)
|
||||||
|
for (auto &C : Callbacks->AnalysisInvalidatedCallbacks)
|
||||||
|
C(Analysis.name(), llvm::Any(&IR));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// AnalysesCleared instrumentation point - takes name of IR that analyses
|
||||||
|
/// operated on.
|
||||||
|
void runAnalysesCleared(StringRef Name) const {
|
||||||
|
if (Callbacks)
|
||||||
|
for (auto &C : Callbacks->AnalysesClearedCallbacks)
|
||||||
|
C(Name);
|
||||||
|
}
|
||||||
|
|
||||||
/// Handle invalidation from the pass manager when PassInstrumentation
|
/// Handle invalidation from the pass manager when PassInstrumentation
|
||||||
/// is used as the result of PassInstrumentationAnalysis.
|
/// is used as the result of PassInstrumentationAnalysis.
|
||||||
///
|
///
|
||||||
|
|
|
@ -746,9 +746,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Construct an empty analysis manager.
|
/// Construct an empty analysis manager.
|
||||||
///
|
AnalysisManager();
|
||||||
/// If \p DebugLogging is true, we'll log our progress to llvm::dbgs().
|
|
||||||
AnalysisManager(bool DebugLogging = false);
|
|
||||||
AnalysisManager(AnalysisManager &&);
|
AnalysisManager(AnalysisManager &&);
|
||||||
AnalysisManager &operator=(AnalysisManager &&);
|
AnalysisManager &operator=(AnalysisManager &&);
|
||||||
|
|
||||||
|
@ -910,9 +908,6 @@ private:
|
||||||
/// Map from an analysis ID and IR unit to a particular cached
|
/// Map from an analysis ID and IR unit to a particular cached
|
||||||
/// analysis result.
|
/// analysis result.
|
||||||
AnalysisResultMapT AnalysisResults;
|
AnalysisResultMapT AnalysisResults;
|
||||||
|
|
||||||
/// Indicates whether we log to \c llvm::dbgs().
|
|
||||||
bool DebugLogging;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern template class AnalysisManager<Module>;
|
extern template class AnalysisManager<Module>;
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
template <typename IRUnitT, typename... ExtraArgTs>
|
template <typename IRUnitT, typename... ExtraArgTs>
|
||||||
inline AnalysisManager<IRUnitT, ExtraArgTs...>::AnalysisManager(
|
inline AnalysisManager<IRUnitT, ExtraArgTs...>::AnalysisManager() {}
|
||||||
bool DebugLogging)
|
|
||||||
: DebugLogging(DebugLogging) {}
|
|
||||||
|
|
||||||
template <typename IRUnitT, typename... ExtraArgTs>
|
template <typename IRUnitT, typename... ExtraArgTs>
|
||||||
inline AnalysisManager<IRUnitT, ExtraArgTs...>::AnalysisManager(
|
inline AnalysisManager<IRUnitT, ExtraArgTs...>::AnalysisManager(
|
||||||
|
@ -37,8 +35,8 @@ template <typename IRUnitT, typename... ExtraArgTs>
|
||||||
inline void
|
inline void
|
||||||
AnalysisManager<IRUnitT, ExtraArgTs...>::clear(IRUnitT &IR,
|
AnalysisManager<IRUnitT, ExtraArgTs...>::clear(IRUnitT &IR,
|
||||||
llvm::StringRef Name) {
|
llvm::StringRef Name) {
|
||||||
if (DebugLogging)
|
if (auto *PI = getCachedResult<PassInstrumentationAnalysis>(IR))
|
||||||
dbgs() << "Clearing all analysis results for: " << Name << "\n";
|
PI->runAnalysesCleared(Name);
|
||||||
|
|
||||||
auto ResultsListI = AnalysisResultLists.find(&IR);
|
auto ResultsListI = AnalysisResultLists.find(&IR);
|
||||||
if (ResultsListI == AnalysisResultLists.end())
|
if (ResultsListI == AnalysisResultLists.end())
|
||||||
|
@ -133,9 +131,8 @@ inline void AnalysisManager<IRUnitT, ExtraArgTs...>::invalidate(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DebugLogging)
|
if (auto *PI = getCachedResult<PassInstrumentationAnalysis>(IR))
|
||||||
dbgs() << "Invalidating analysis: " << this->lookUpPass(ID).name()
|
PI->runAnalysisInvalidated(this->lookUpPass(ID), IR);
|
||||||
<< " on " << IR.getName() << "\n";
|
|
||||||
|
|
||||||
I = ResultsList.erase(I);
|
I = ResultsList.erase(I);
|
||||||
AnalysisResults.erase({ID, &IR});
|
AnalysisResults.erase({ID, &IR});
|
||||||
|
|
|
@ -221,10 +221,10 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
|
||||||
PGOOptions::IRUse, PGOOptions::CSIRUse);
|
PGOOptions::IRUse, PGOOptions::CSIRUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoopAnalysisManager LAM(Conf.DebugPassManager);
|
LoopAnalysisManager LAM;
|
||||||
FunctionAnalysisManager FAM(Conf.DebugPassManager);
|
FunctionAnalysisManager FAM;
|
||||||
CGSCCAnalysisManager CGAM(Conf.DebugPassManager);
|
CGSCCAnalysisManager CGAM;
|
||||||
ModuleAnalysisManager MAM(Conf.DebugPassManager);
|
ModuleAnalysisManager MAM;
|
||||||
|
|
||||||
PassInstrumentationCallbacks PIC;
|
PassInstrumentationCallbacks PIC;
|
||||||
StandardInstrumentations SI(Conf.DebugPassManager);
|
StandardInstrumentations SI(Conf.DebugPassManager);
|
||||||
|
|
|
@ -900,6 +900,14 @@ void PrintPassInstrumentation::registerCallbacks(
|
||||||
PIC.registerBeforeAnalysisCallback([](StringRef PassID, Any IR) {
|
PIC.registerBeforeAnalysisCallback([](StringRef PassID, Any IR) {
|
||||||
dbgs() << "Running analysis: " << PassID << " on " << getIRName(IR) << "\n";
|
dbgs() << "Running analysis: " << PassID << " on " << getIRName(IR) << "\n";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
PIC.registerAnalysisInvalidatedCallback([](StringRef PassID, Any IR) {
|
||||||
|
dbgs() << "Invalidating analysis: " << PassID << " on " << getIRName(IR)
|
||||||
|
<< "\n";
|
||||||
|
});
|
||||||
|
PIC.registerAnalysesClearedCallback([](StringRef IRName) {
|
||||||
|
dbgs() << "Clearing all analysis results for: " << IRName << "\n";
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void PassStructurePrinter::printWithIdent(bool Expand, const Twine &Msg) {
|
void PassStructurePrinter::printWithIdent(bool Expand, const Twine &Msg) {
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
; CHECK: Running pass: LoopUnrollPass
|
; CHECK: Running pass: LoopUnrollPass
|
||||||
; CHECK: Clearing all analysis results for: inner2.header
|
; CHECK: Clearing all analysis results for: inner2.header
|
||||||
; CHECK: Clearing all analysis results for: outer.header
|
; CHECK: Clearing all analysis results for: outer.header
|
||||||
; CHECK: Invalidating analysis: LoopAccessAnalysis on inner1.header
|
; CHECK: Invalidating analysis: LoopAccessAnalysis on {{.*}}inner1.header
|
||||||
; CHECK-NOT: Invalidating analysis: LoopAccessAnalysis on inner1.header.1
|
; CHECK-NOT: Invalidating analysis: LoopAccessAnalysis on {{.*}}inner1.header.1
|
||||||
; CHECK: Starting Loop pass manager run.
|
; CHECK: Starting Loop pass manager run.
|
||||||
; CHECK: Running pass: LoopAccessInfoPrinterPass
|
; CHECK: Running pass: LoopAccessInfoPrinterPass
|
||||||
; CHECK: Running analysis: LoopAccessAnalysis on Loop at depth 1 containing: %inner1.header
|
; CHECK: Running analysis: LoopAccessAnalysis on Loop at depth 1 containing: %inner1.header
|
||||||
|
|
|
@ -277,10 +277,10 @@ bool llvm::runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
|
||||||
P->CSAction = PGOOptions::CSIRUse;
|
P->CSAction = PGOOptions::CSIRUse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LoopAnalysisManager LAM(DebugPM);
|
LoopAnalysisManager LAM;
|
||||||
FunctionAnalysisManager FAM(DebugPM);
|
FunctionAnalysisManager FAM;
|
||||||
CGSCCAnalysisManager CGAM(DebugPM);
|
CGSCCAnalysisManager CGAM;
|
||||||
ModuleAnalysisManager MAM(DebugPM);
|
ModuleAnalysisManager MAM;
|
||||||
|
|
||||||
PassInstrumentationCallbacks PIC;
|
PassInstrumentationCallbacks PIC;
|
||||||
StandardInstrumentations SI(DebugPM, VerifyEachPass);
|
StandardInstrumentations SI(DebugPM, VerifyEachPass);
|
||||||
|
|
|
@ -202,8 +202,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CGSCCPassManagerTest()
|
CGSCCPassManagerTest()
|
||||||
: FAM(/*DebugLogging*/ true), CGAM(/*DebugLogging*/ true),
|
: FAM(), CGAM(), MAM(),
|
||||||
MAM(/*DebugLogging*/ true),
|
|
||||||
M(parseIR(
|
M(parseIR(
|
||||||
// Define a module with the following call graph, where calls go
|
// Define a module with the following call graph, where calls go
|
||||||
// out the bottom of nodes and enter the top:
|
// out the bottom of nodes and enter the top:
|
||||||
|
|
|
@ -208,10 +208,10 @@ TEST_F(PassManagerTest, Basic) {
|
||||||
LLVMTargetMachine *LLVMTM = static_cast<LLVMTargetMachine *>(TM.get());
|
LLVMTargetMachine *LLVMTM = static_cast<LLVMTargetMachine *>(TM.get());
|
||||||
M->setDataLayout(TM->createDataLayout());
|
M->setDataLayout(TM->createDataLayout());
|
||||||
|
|
||||||
LoopAnalysisManager LAM(/*DebugLogging=*/true);
|
LoopAnalysisManager LAM;
|
||||||
FunctionAnalysisManager FAM(/*DebugLogging=*/true);
|
FunctionAnalysisManager FAM;
|
||||||
CGSCCAnalysisManager CGAM(/*DebugLogging=*/true);
|
CGSCCAnalysisManager CGAM;
|
||||||
ModuleAnalysisManager MAM(/*DebugLogging=*/true);
|
ModuleAnalysisManager MAM;
|
||||||
PassBuilder PB(TM.get());
|
PassBuilder PB(TM.get());
|
||||||
PB.registerModuleAnalyses(MAM);
|
PB.registerModuleAnalyses(MAM);
|
||||||
PB.registerFunctionAnalyses(FAM);
|
PB.registerFunctionAnalyses(FAM);
|
||||||
|
@ -225,8 +225,7 @@ TEST_F(PassManagerTest, Basic) {
|
||||||
MachineFunctionAnalysisManager MFAM;
|
MachineFunctionAnalysisManager MFAM;
|
||||||
{
|
{
|
||||||
// Test move assignment.
|
// Test move assignment.
|
||||||
MachineFunctionAnalysisManager NestedMFAM(FAM, MAM,
|
MachineFunctionAnalysisManager NestedMFAM(FAM, MAM);
|
||||||
/*DebugLogging*/ true);
|
|
||||||
NestedMFAM.registerPass([&] { return PassInstrumentationAnalysis(); });
|
NestedMFAM.registerPass([&] { return PassInstrumentationAnalysis(); });
|
||||||
NestedMFAM.registerPass([&] { return TestMachineFunctionAnalysis(); });
|
NestedMFAM.registerPass([&] { return TestMachineFunctionAnalysis(); });
|
||||||
MFAM = std::move(NestedMFAM);
|
MFAM = std::move(NestedMFAM);
|
||||||
|
@ -241,7 +240,7 @@ TEST_F(PassManagerTest, Basic) {
|
||||||
MachineFunctionPassManager MFPM;
|
MachineFunctionPassManager MFPM;
|
||||||
{
|
{
|
||||||
// Test move assignment.
|
// Test move assignment.
|
||||||
MachineFunctionPassManager NestedMFPM(/*DebugLogging*/ true);
|
MachineFunctionPassManager NestedMFPM;
|
||||||
NestedMFPM.addPass(TestMachineModulePass(Count, TestMachineModuleCount[0]));
|
NestedMFPM.addPass(TestMachineModulePass(Count, TestMachineModuleCount[0]));
|
||||||
NestedMFPM.addPass(TestMachineFunctionPass(Count, BeforeInitialization[0],
|
NestedMFPM.addPass(TestMachineFunctionPass(Count, BeforeInitialization[0],
|
||||||
BeforeFinalization[0],
|
BeforeFinalization[0],
|
||||||
|
|
|
@ -467,7 +467,7 @@ protected:
|
||||||
"}\n")),
|
"}\n")),
|
||||||
CallbacksHandle(), PB(false, nullptr, PipelineTuningOptions(), None,
|
CallbacksHandle(), PB(false, nullptr, PipelineTuningOptions(), None,
|
||||||
&CallbacksHandle.Callbacks),
|
&CallbacksHandle.Callbacks),
|
||||||
PM(true), LAM(true), FAM(true), CGAM(true), AM(true) {
|
PM(true), LAM(), FAM(), CGAM(), AM() {
|
||||||
|
|
||||||
EXPECT_TRUE(&CallbacksHandle.Callbacks ==
|
EXPECT_TRUE(&CallbacksHandle.Callbacks ==
|
||||||
PB.getPassInstrumentationCallbacks());
|
PB.getPassInstrumentationCallbacks());
|
||||||
|
|
|
@ -419,11 +419,11 @@ TEST(PreservedAnalysisTest, Abandon) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PassManagerTest, Basic) {
|
TEST_F(PassManagerTest, Basic) {
|
||||||
FunctionAnalysisManager FAM(/*DebugLogging*/ true);
|
FunctionAnalysisManager FAM;
|
||||||
int FunctionAnalysisRuns = 0;
|
int FunctionAnalysisRuns = 0;
|
||||||
FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); });
|
FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); });
|
||||||
|
|
||||||
ModuleAnalysisManager MAM(/*DebugLogging*/ true);
|
ModuleAnalysisManager MAM;
|
||||||
int ModuleAnalysisRuns = 0;
|
int ModuleAnalysisRuns = 0;
|
||||||
MAM.registerPass([&] { return TestModuleAnalysis(ModuleAnalysisRuns); });
|
MAM.registerPass([&] { return TestModuleAnalysis(ModuleAnalysisRuns); });
|
||||||
MAM.registerPass([&] { return FunctionAnalysisManagerModuleProxy(FAM); });
|
MAM.registerPass([&] { return FunctionAnalysisManagerModuleProxy(FAM); });
|
||||||
|
@ -704,8 +704,8 @@ struct LambdaPass : public PassInfoMixin<LambdaPass> {
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(PassManagerTest, IndirectAnalysisInvalidation) {
|
TEST_F(PassManagerTest, IndirectAnalysisInvalidation) {
|
||||||
FunctionAnalysisManager FAM(/*DebugLogging*/ true);
|
FunctionAnalysisManager FAM;
|
||||||
ModuleAnalysisManager MAM(/*DebugLogging*/ true);
|
ModuleAnalysisManager MAM;
|
||||||
int FunctionAnalysisRuns = 0, ModuleAnalysisRuns = 0,
|
int FunctionAnalysisRuns = 0, ModuleAnalysisRuns = 0,
|
||||||
IndirectAnalysisRuns = 0, DoublyIndirectAnalysisRuns = 0;
|
IndirectAnalysisRuns = 0, DoublyIndirectAnalysisRuns = 0;
|
||||||
FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); });
|
FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); });
|
||||||
|
@ -823,7 +823,7 @@ TEST_F(PassManagerTest, FunctionPassCFGChecker) {
|
||||||
"}\n");
|
"}\n");
|
||||||
|
|
||||||
auto *F = M->getFunction("foo");
|
auto *F = M->getFunction("foo");
|
||||||
FunctionAnalysisManager FAM(/*DebugLogging*/ true);
|
FunctionAnalysisManager FAM;
|
||||||
FunctionPassManager FPM(/*DebugLogging*/ true);
|
FunctionPassManager FPM(/*DebugLogging*/ true);
|
||||||
PassInstrumentationCallbacks PIC;
|
PassInstrumentationCallbacks PIC;
|
||||||
StandardInstrumentations SI(/*DebugLogging*/ true);
|
StandardInstrumentations SI(/*DebugLogging*/ true);
|
||||||
|
@ -869,7 +869,7 @@ TEST_F(PassManagerTest, FunctionPassCFGCheckerInvalidateAnalysis) {
|
||||||
"}\n");
|
"}\n");
|
||||||
|
|
||||||
auto *F = M->getFunction("foo");
|
auto *F = M->getFunction("foo");
|
||||||
FunctionAnalysisManager FAM(/*DebugLogging*/ true);
|
FunctionAnalysisManager FAM;
|
||||||
FunctionPassManager FPM(/*DebugLogging*/ true);
|
FunctionPassManager FPM(/*DebugLogging*/ true);
|
||||||
PassInstrumentationCallbacks PIC;
|
PassInstrumentationCallbacks PIC;
|
||||||
StandardInstrumentations SI(/*DebugLogging*/ true);
|
StandardInstrumentations SI(/*DebugLogging*/ true);
|
||||||
|
@ -934,7 +934,7 @@ TEST_F(PassManagerTest, FunctionPassCFGCheckerWrapped) {
|
||||||
"}\n");
|
"}\n");
|
||||||
|
|
||||||
auto *F = M->getFunction("foo");
|
auto *F = M->getFunction("foo");
|
||||||
FunctionAnalysisManager FAM(/*DebugLogging*/ true);
|
FunctionAnalysisManager FAM;
|
||||||
FunctionPassManager FPM(/*DebugLogging*/ true);
|
FunctionPassManager FPM(/*DebugLogging*/ true);
|
||||||
PassInstrumentationCallbacks PIC;
|
PassInstrumentationCallbacks PIC;
|
||||||
StandardInstrumentations SI(/*DebugLogging*/ true);
|
StandardInstrumentations SI(/*DebugLogging*/ true);
|
||||||
|
|
|
@ -297,7 +297,7 @@ public:
|
||||||
"end:\n"
|
"end:\n"
|
||||||
" ret void\n"
|
" ret void\n"
|
||||||
"}\n")),
|
"}\n")),
|
||||||
LAM(true), FAM(true), MAM(true) {
|
LAM(), FAM(), MAM() {
|
||||||
// Register our mock analysis.
|
// Register our mock analysis.
|
||||||
LAM.registerPass([&] { return MLAHandle.getAnalysis(); });
|
LAM.registerPass([&] { return MLAHandle.getAnalysis(); });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue