File tree Expand file tree Collapse file tree
compiler/rustc_llvm/llvm-wrapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -732,12 +732,7 @@ extern "C" LLVMRustResult LLVMRustOptimize(
732732PTO .SLPVectorization = SLPVectorize;
733733PTO .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
742737if (LlvmSelfProfiler) {
743738LLVMSelfProfileInitializeCallbacks (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+
787788if (LLVMPluginsLen) {
788789auto PluginsStr = StringRef (LLVMPlugins, LLVMPluginsLen);
789790 SmallVector<StringRef> Plugins;
You can’t perform that action at this time.
0 commit comments