mach backend: use vectors instead of sets to remember set of uses/defs for calls;

This avoids the set uniqueness (hashing) test, reduces memory
churn when re-mapping virtual register onto real registers, and is
generally more memory-efficient.
This commit is contained in:
Benjamin Bouvier
2020-06-01 15:09:00 +02:00
parent cfa0527794
commit e227608510
6 changed files with 47 additions and 58 deletions

View File

@@ -2114,8 +2114,8 @@ fn test_aarch64_binemit() {
insns.push((
Inst::Call {
dest: Box::new(ExternalName::testcase("test0")),
uses: Box::new(Set::empty()),
defs: Box::new(Set::empty()),
uses: Vec::new().into_boxed_slice(),
defs: Vec::new().into_boxed_slice(),
loc: SourceLoc::default(),
opcode: Opcode::Call,
},
@@ -2126,8 +2126,8 @@ fn test_aarch64_binemit() {
insns.push((
Inst::CallInd {
rn: xreg(10),
uses: Box::new(Set::empty()),
defs: Box::new(Set::empty()),
uses: Vec::new().into_boxed_slice(),
defs: Vec::new().into_boxed_slice(),
loc: SourceLoc::default(),
opcode: Opcode::CallIndirect,
},