Rearrange some struct fields to work better with u64_key/u128_key

This allows the compiler to load the whole key with 1 or 2 64-bit
accesses, assuming little-endian ordering.

Improves instruction count by ~1%.
This commit is contained in:
Amanieu d'Antras
2022-01-11 12:48:28 +00:00
parent 693fb6a975
commit 2d9d5dd82b
5 changed files with 137 additions and 90 deletions

View File

@@ -16,7 +16,7 @@ use super::{
Env, LiveBundleIndex, LiveRangeIndex, LiveRangeKey, SpillSet, SpillSetIndex, SpillSlotIndex,
VRegIndex,
};
use crate::{Function, Inst, OperandConstraint, PReg};
use crate::{ion::data_structures::BlockparamOut, Function, Inst, OperandConstraint, PReg};
use smallvec::smallvec;
impl<'a, F: Function> Env<'a, F> {
@@ -332,7 +332,9 @@ impl<'a, F: Function> Env<'a, F> {
// Attempt to merge blockparams with their inputs.
for i in 0..self.blockparam_outs.len() {
let (from_vreg, _, _, to_vreg) = self.blockparam_outs[i];
let BlockparamOut {
from_vreg, to_vreg, ..
} = self.blockparam_outs[i];
log::trace!(
"trying to merge blockparam v{} with input v{}",
to_vreg.index(),