diff options
| author | bors <bors@rust-lang.org> | 2024-08-30 05:13:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-30 05:13:13 +0000 |
| commit | f03c7b21700478c6c2b335b37caba72c3a06e447 (patch) | |
| tree | 5ea72db01aae5b01c502d58a9d4f69cbfab321af /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | ad7a1aa32ab388dd9748a10a4c983df9da3d23cb (diff) | |
| parent | 23f4eae905486ee02cecee1200fb8623a7ef376a (diff) | |
| download | rust-f03c7b21700478c6c2b335b37caba72c3a06e447.tar.gz rust-f03c7b21700478c6c2b335b37caba72c3a06e447.zip | |
Auto merge of #3853 - rust-lang:rustup-2024-08-30, r=saethlin
Automatic Rustup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 9884ed15b8a..c7306b0516f 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -713,7 +713,7 @@ extern "C" LLVMRustResult LLVMRustOptimize( LLVMModuleRef ModuleRef, LLVMTargetMachineRef TMRef, LLVMRustPassBuilderOptLevel OptLevelRust, LLVMRustOptStage OptStage, bool IsLinkerPluginLTO, bool NoPrepopulatePasses, bool VerifyIR, - bool UseThinLTOBuffers, bool MergeFunctions, bool UnrollLoops, + bool LintIR, bool UseThinLTOBuffers, bool MergeFunctions, bool UnrollLoops, bool SLPVectorize, bool LoopVectorize, bool DisableSimplifyLibCalls, bool EmitLifetimeMarkers, LLVMRustSanitizerOptions *SanitizerOptions, const char *PGOGenPath, const char *PGOUsePath, bool InstrumentCoverage, @@ -842,6 +842,13 @@ extern "C" LLVMRustResult LLVMRustOptimize( }); } + if (LintIR) { + PipelineStartEPCallbacks.push_back( + [](ModulePassManager &MPM, OptimizationLevel Level) { + MPM.addPass(createModuleToFunctionPassAdaptor(LintPass())); + }); + } + if (InstrumentGCOV) { PipelineStartEPCallbacks.push_back( [](ModulePassManager &MPM, OptimizationLevel Level) { |
