File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
compiler/rustc_llvm/llvm-wrapper Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -732,12 +732,7 @@ extern "C" LLVMRustResult LLVMRustOptimize(
732732 PTO.SLPVectorization = SLPVectorize;
733733 PTO.MergeFunctions = MergeFunctions;
734734
735- // FIXME: We may want to expose this as an option.
736- bool DebugPassManager = false ;
737-
738735 PassInstrumentationCallbacks PIC;
739- StandardInstrumentations SI (TheModule->getContext (), DebugPassManager);
740- SI.registerCallbacks (PIC);
741736
742737 if (LlvmSelfProfiler) {
743738 LLVMSelfProfileInitializeCallbacks (PIC, LlvmSelfProfiler,
@@ -784,6 +779,12 @@ extern "C" LLVMRustResult LLVMRustOptimize(
784779 CGSCCAnalysisManager CGAM;
785780 ModuleAnalysisManager MAM;
786781
782+ // FIXME: We may want to expose this as an option.
783+ bool DebugPassManager = false ;
784+
785+ StandardInstrumentations SI (TheModule->getContext (), DebugPassManager);
786+ SI.registerCallbacks (PIC, &MAM);
787+
787788 if (LLVMPluginsLen) {
788789 auto PluginsStr = StringRef (LLVMPlugins, LLVMPluginsLen);
789790 SmallVector<StringRef> Plugins;
You can’t perform that action at this time.
0 commit comments