Skip to content

Commit

Permalink
Pass Module Analysis Manager to Standard Instrumentations
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Romanov committed Sep 25, 2024
1 parent b511753 commit 4a2253b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,7 @@ extern "C" LLVMRustResult LLVMRustOptimize(
PTO.SLPVectorization = SLPVectorize;
PTO.MergeFunctions = MergeFunctions;

// FIXME: We may want to expose this as an option.
bool DebugPassManager = false;

PassInstrumentationCallbacks PIC;
StandardInstrumentations SI(TheModule->getContext(), DebugPassManager);
SI.registerCallbacks(PIC);

if (LlvmSelfProfiler) {
LLVMSelfProfileInitializeCallbacks(PIC, LlvmSelfProfiler,
Expand Down Expand Up @@ -783,6 +778,12 @@ extern "C" LLVMRustResult LLVMRustOptimize(
FunctionAnalysisManager FAM;
CGSCCAnalysisManager CGAM;
ModuleAnalysisManager MAM;

Check failure on line 781 in compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

View workflow job for this annotation

GitHub Actions / PR - mingw-check-tidy

trailing whitespace
// FIXME: We may want to expose this as an option.
bool DebugPassManager = false;

StandardInstrumentations SI(TheModule->getContext(), DebugPassManager);
SI.registerCallbacks(PIC, &MAM);

if (LLVMPluginsLen) {
auto PluginsStr = StringRef(LLVMPlugins, LLVMPluginsLen);
Expand Down

0 comments on commit 4a2253b

Please sign in to comment.