Skip to content

Commit 150bd8b

Browse files
nagisaMark-Simulacrum
authored andcommitted
[1.57] Disable LLVM newPM by default
1 parent e618cba commit 150bd8b

File tree

1 file changed

+4
-8
lines changed
  • compiler/rustc_codegen_llvm/src/back

1 file changed

+4
-8
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -378,18 +378,14 @@ fn get_pgo_sample_use_path(config: &ModuleConfig) -> Option<CString> {
378378
}
379379

380380
pub(crate) fn should_use_new_llvm_pass_manager(
381-
cgcx: &CodegenContext<LlvmCodegenBackend>,
381+
_cgcx: &CodegenContext<LlvmCodegenBackend>,
382382
config: &ModuleConfig,
383383
) -> bool {
384-
// The new pass manager is enabled by default for LLVM >= 13.
385-
// This matches Clang, which also enables it since Clang 13.
386-
387-
// FIXME: There are some perf issues with the new pass manager
388-
// when targeting s390x, so it is temporarily disabled for that
389-
// arch, see https://github.com/rust-lang/rust/issues/89609
384+
// The new pass manager is causing significant performance issues such as #91128, and is
385+
// therefore disabled in stable versions of rustc by default.
390386
config
391387
.new_llvm_pass_manager
392-
.unwrap_or_else(|| cgcx.target_arch != "s390x" && llvm_util::get_version() >= (13, 0, 0))
388+
.unwrap_or(false)
393389
}
394390

395391
pub(crate) unsafe fn optimize_with_new_llvm_pass_manager(

0 commit comments

Comments
 (0)