diff options
| author | bors <bors@rust-lang.org> | 2021-03-13 02:08:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-13 02:08:33 +0000 |
| commit | 4d76b4ca52a65d63ab83d82d6630f1df8ec05a93 (patch) | |
| tree | 0d5e3411672f54161a369a80e9f31fc612d323c1 /compiler/rustc_llvm/llvm-wrapper | |
| parent | 46a934a1dc789b9441e5fb5cd043287baddcc5c7 (diff) | |
| parent | 684fa1977c687520d0b5b8fad45488ec1cba6da0 (diff) | |
| download | rust-4d76b4ca52a65d63ab83d82d6630f1df8ec05a93.tar.gz rust-4d76b4ca52a65d63ab83d82d6630f1df8ec05a93.zip | |
Auto merge of #83067 - JohnTitor:rollup-0wo338i, r=JohnTitor
Rollup of 6 pull requests Successful merges: - #82984 (Simplify ast block lowering) - #83012 (Update Clippy) - #83020 (Emit the enum range assumption if the range only contains one element) - #83037 (Support merge_functions option in NewPM since LLVM >= 12) - #83052 (updated vulnerable deps) - #83059 (Allow configuring `rustdoc --disable-minification` in config.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 2f28162f908..e7c210b6c7a 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -772,14 +772,18 @@ LLVMRustOptimizeWithNewPassManager( TargetMachine *TM = unwrap(TMRef); PassBuilder::OptimizationLevel OptLevel = fromRust(OptLevelRust); - // FIXME: MergeFunctions is not supported by NewPM yet. - (void) MergeFunctions; PipelineTuningOptions PTO; PTO.LoopUnrolling = UnrollLoops; PTO.LoopInterleaving = UnrollLoops; PTO.LoopVectorization = LoopVectorize; PTO.SLPVectorization = SLPVectorize; +#if LLVM_VERSION_GE(12, 0) + PTO.MergeFunctions = MergeFunctions; +#else + // MergeFunctions is not supported by NewPM in older LLVM versions. + (void) MergeFunctions; +#endif // FIXME: We may want to expose this as an option. bool DebugPassManager = false; |
