1
Fork 0

Pass target_features set instead of has_feature closure

This avoids unnecessary monomorphizations in codegen backends
This commit is contained in:
bjorn3 2022-01-10 15:48:05 +01:00
parent 991cbd1503
commit 042aa379a5
8 changed files with 63 additions and 62 deletions

View file

@ -66,7 +66,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
for (abi_name, abi_span) in &asm.clobber_abis {
match asm::InlineAsmClobberAbi::parse(
asm_arch,
|feature| self.sess.target_features.contains(&feature),
&self.sess.target_features,
&self.sess.target,
*abi_name,
) {
@ -134,7 +134,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
asm::InlineAsmRegOrRegClass::Reg(if let Some(asm_arch) = asm_arch {
asm::InlineAsmReg::parse(
asm_arch,
|feature| sess.target_features.contains(&feature),
&sess.target_features,
&sess.target,
s,
)