Use value lists for call arguments.
Add a new kind of instruction format that keeps all of its value arguments in a value list. These value lists are all allocated out of the dfg.value_lists memory pool. Instruction formats with the value_list property set store *all* of their value arguments in a single value list. There is no distinction between fixed arguments and variable arguments. Change the Call instruction format to use the value list representation for its arguments. This change is only the beginning. The intent is to eliminate the boxed_storage instruction formats completely. Value lists use less memory, and when the transition is complete, InstructionData will have a trivial Drop implementation.
This commit is contained in:
@@ -299,7 +299,8 @@ impl<'a> Context<'a> {
|
||||
}
|
||||
ConstraintKind::Tied(arg_index) => {
|
||||
// This def must use the same register as a fixed instruction argument.
|
||||
let loc = locations[dfg[inst].arguments()[0][arg_index as usize]];
|
||||
let arg = dfg[inst].arguments(&dfg.value_lists)[0][arg_index as usize];
|
||||
let loc = locations[arg];
|
||||
*locations.ensure(lv.value) = loc;
|
||||
// Mark the reused register. It's not really clear if we support tied
|
||||
// stack operands. We could do that for some Intel read-modify-write
|
||||
|
||||
@@ -318,7 +318,7 @@ impl Liveness {
|
||||
let mut operand_constraints =
|
||||
recipe_constraints.get(recipe).map(|c| c.ins).unwrap_or(&[]).iter();
|
||||
|
||||
func.dfg[inst].each_arg(|arg| {
|
||||
func.dfg[inst].each_arg(&func.dfg.value_lists, |arg| {
|
||||
// Get the live range, create it as a dead range if necessary.
|
||||
let lr = get_or_create(&mut self.ranges, arg, func, recipe_constraints);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user