1
Fork 0

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`
This commit is contained in:
bors 2025-03-11 12:05:16 +00:00
commit ebf0cf75d3
9 changed files with 120 additions and 113 deletions

View file

@ -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>(