Pass target_features set instead of has_feature closure
This avoids unnecessary monomorphizations in codegen backends
This commit is contained in:
parent
991cbd1503
commit
042aa379a5
8 changed files with 63 additions and 62 deletions
|
@ -182,11 +182,7 @@ struct InlineAssemblyGenerator<'a, 'tcx> {
|
|||
impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
|
||||
fn allocate_registers(&mut self) {
|
||||
let sess = self.tcx.sess;
|
||||
let map = allocatable_registers(
|
||||
self.arch,
|
||||
|feature| sess.target_features.contains(&feature),
|
||||
&sess.target,
|
||||
);
|
||||
let map = allocatable_registers(self.arch, &sess.target_features, &sess.target);
|
||||
let mut allocated = FxHashMap::<_, (bool, bool)>::default();
|
||||
let mut regs = vec![None; self.operands.len()];
|
||||
|
||||
|
@ -319,7 +315,7 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
|
|||
// Allocate stack slots for saving clobbered registers
|
||||
let abi_clobber = InlineAsmClobberAbi::parse(
|
||||
self.arch,
|
||||
|feature| self.tcx.sess.target_features.contains(&feature),
|
||||
&self.tcx.sess.target_features,
|
||||
&self.tcx.sess.target,
|
||||
sym::C,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue