Make clobber_abis use an FxIndexMap

It seems to be used more for lookup than iteration, so this could be a
perf hit
This commit is contained in:
CastilloDel 2022-11-06 17:48:00 +01:00
parent 769cc733b1
commit d1eab51f47

View file

@ -11,7 +11,7 @@ use super::LoweringContext;
use rustc_ast::ptr::P;
use rustc_ast::*;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::definitions::DefPathData;
@ -71,7 +71,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
.emit();
}
let mut clobber_abis = FxHashMap::default();
let mut clobber_abis = FxIndexMap::default();
if let Some(asm_arch) = asm_arch {
for (abi_name, abi_span) in &asm.clobber_abis {
match asm::InlineAsmClobberAbi::parse(asm_arch, &self.tcx.sess.target, *abi_name) {