diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2021-11-24 21:13:53 +0200 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-11-26 15:15:36 -0500 |
| commit | 150bd8ba76722a46fd8a7aacb81c7072a8b677dc (patch) | |
| tree | 9b8500d228972307224f1818ca006ddf606546dc /compiler/rustc_codegen_llvm/src | |
| parent | e618cbab2d6ce0f49f8b6e13f434d9629ca06680 (diff) | |
| download | rust-150bd8ba76722a46fd8a7aacb81c7072a8b677dc.tar.gz rust-150bd8ba76722a46fd8a7aacb81c7072a8b677dc.zip | |
[1.57] Disable LLVM newPM by default
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index 380dfd38723..b6d682f2323 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -378,18 +378,14 @@ fn get_pgo_sample_use_path(config: &ModuleConfig) -> Option<CString> { } pub(crate) fn should_use_new_llvm_pass_manager( - cgcx: &CodegenContext<LlvmCodegenBackend>, + _cgcx: &CodegenContext<LlvmCodegenBackend>, config: &ModuleConfig, ) -> bool { - // The new pass manager is enabled by default for LLVM >= 13. - // This matches Clang, which also enables it since Clang 13. - - // FIXME: There are some perf issues with the new pass manager - // when targeting s390x, so it is temporarily disabled for that - // arch, see https://github.com/rust-lang/rust/issues/89609 + // The new pass manager is causing significant performance issues such as #91128, and is + // therefore disabled in stable versions of rustc by default. config .new_llvm_pass_manager - .unwrap_or_else(|| cgcx.target_arch != "s390x" && llvm_util::get_version() >= (13, 0, 0)) + .unwrap_or(false) } pub(crate) unsafe fn optimize_with_new_llvm_pass_manager( |
