Skip to content

Commit 59387f5

Browse files
nikicMark-Simulacrum
authored andcommitted
Use new pass manager on s390x with LLVM 14
The problematic compile-time issue should be resolved with this version.
1 parent 897ce09 commit 59387f5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,9 @@ pub(crate) fn should_use_new_llvm_pass_manager(user_opt: &Option<bool>, target_a
475475
// The new pass manager is enabled by default for LLVM >= 13.
476476
// This matches Clang, which also enables it since Clang 13.
477477

478-
// FIXME: There are some perf issues with the new pass manager
479-
// when targeting s390x, so it is temporarily disabled for that
480-
// arch, see https://github.com/rust-lang/rust/issues/89609
481-
user_opt.unwrap_or_else(|| target_arch != "s390x" && llvm_util::get_version() >= (13, 0, 0))
478+
// There are some perf issues with the new pass manager when targeting
479+
// s390x with LLVM 13, so enable the new pass manager only with LLVM 14.
480+
// See https://github.com/rust-lang/rust/issues/89609.
481+
let min_version = if target_arch == "s390x" { 14 } else { 13 };
482+
user_opt.unwrap_or_else(|| llvm_util::get_version() >= (min_version, 0, 0))
482483
}

0 commit comments

Comments
 (0)