diff options
| author | bors <bors@rust-lang.org> | 2025-03-11 12:05:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-11 12:05:16 +0000 |
| commit | ebf0cf75d368c035f4c7e7246d203bd469ee4a51 (patch) | |
| tree | 1c26d90ad88273c67bd0f169b122ebd9a4b88e84 /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 705421b52239d7393b4738764b192179d5c139c2 (diff) | |
| parent | cee311454427bf5049f5493bb7c7d74df2abb369 (diff) | |
| download | rust-ebf0cf75d368c035f4c7e7246d203bd469ee4a51.tar.gz rust-ebf0cf75d368c035f4c7e7246d203bd469ee4a51.zip | |
Auto merge of #137586 - nnethercote:SetImpliedBits, r=bjorn3
Speed up target feature computation The LLVM backend calls `LLVMRustHasFeature` twice for every feature. In short-running rustc invocations, this accounts for a surprising amount of work. r? `@bjorn3`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index e51d4852db2..dec93bbccc3 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -341,8 +341,8 @@ impl CodegenBackend for LlvmCodegenBackend { llvm_util::print_version(); } - fn target_features_cfg(&self, sess: &Session, allow_unstable: bool) -> Vec<Symbol> { - target_features_cfg(sess, allow_unstable) + fn target_features_cfg(&self, sess: &Session) -> (Vec<Symbol>, Vec<Symbol>) { + target_features_cfg(sess) } fn codegen_crate<'tcx>( |
