diff options
| author | bors <bors@rust-lang.org> | 2024-08-29 20:45:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-29 20:45:00 +0000 |
| commit | 0d634185dfddefe09047881175f35c65d68dcff1 (patch) | |
| tree | c85fc78596b0d89063efefc1e1f3437e51c7e15e /compiler/rustc_llvm/llvm-wrapper | |
| parent | 784d444733d65c3d305ce5edcbb41e3d0d0aee2e (diff) | |
| parent | 9c7ae1d4d88b5212eabff72441b7d316e52df164 (diff) | |
| download | rust-0d634185dfddefe09047881175f35c65d68dcff1.tar.gz rust-0d634185dfddefe09047881175f35c65d68dcff1.zip | |
Auto merge of #129750 - GuillaumeGomez:rollup-gphsb7y, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #123940 (debug-fmt-detail option) - #128166 (Improved `checked_isqrt` and `isqrt` methods) - #128970 (Add `-Zlint-llvm-ir`) - #129316 (riscv64imac: allow shadow call stack sanitizer) - #129690 (Add `needs-unwind` compiletest directive to `libtest-thread-limit` and replace some `Path` with `path` in `run-make`) - #129732 (Add `unreachable_pub`, round 3) - #129743 (Fix rustdoc clippy lints) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -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) { |
