Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable new pass manager by default for the s390x targets. #89662

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ impl ModuleConfig {
},

inline_threshold: sess.opts.cg.inline_threshold,
new_llvm_pass_manager: sess.opts.debugging_opts.new_llvm_pass_manager,
new_llvm_pass_manager: sess
.opts
.debugging_opts
.new_llvm_pass_manager
.or(sess.target.llvm_new_pass_manager),
emit_lifetime_markers: sess.emit_lifetime_markers(),
}
}
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,9 @@ pub struct TargetOptions {

/// Minimum number of bits in #[repr(C)] enum. Defaults to 32.
pub c_enum_min_bits: u64,

/// Default for the new LLVM pass manager, usually unspecified (None).
pub llvm_new_pass_manager: Option<bool>,
}

impl Default for TargetOptions {
Expand Down Expand Up @@ -1455,6 +1458,7 @@ impl Default for TargetOptions {
supported_sanitizers: SanitizerSet::empty(),
default_adjusted_cabi: None,
c_enum_min_bits: 32,
llvm_new_pass_manager: None,
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ pub fn target() -> Target {
base.max_atomic_width = Some(64);
base.min_global_align = Some(16);

// FIXME: There are currently some troubles with the new pass manager
// and this target, see https://github.com/rust-lang/rust/issues/89609
base.llvm_new_pass_manager = Some(false);

Target {
llvm_target: "s390x-unknown-linux-gnu".to_string(),
pointer_width: 64,
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_target/src/spec/s390x_unknown_linux_musl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ pub fn target() -> Target {
base.min_global_align = Some(16);
base.static_position_independent_executables = true;

// FIXME: There are currently some troubles with the new pass manager
// and this target, see https://github.com/rust-lang/rust/issues/89609
base.llvm_new_pass_manager = Some(false);

Target {
llvm_target: "s390x-unknown-linux-musl".to_string(),
pointer_width: 64,
Expand Down