Remove the dfg::resolve_copies() method.

This method was important back when result values couldn't be moved
between instructions. Now that results can be moved, value aliases do
everything we need.

Copy instructions are still used to break interferences in the register
allocator's coalescing phase, but there isn't really any reason to use a
copy instruction over a value alias anywhere else.

After and during register allocation, copy instructions are significant,
so we never want to "see through" them like the resolve_copies()
function did.

This is related to #166, but probably doesn't fix the underlying
problem.
This commit is contained in:
Jakob Stoklund Olesen
2017-10-05 14:46:34 -07:00
parent 30aeb57083
commit b562fdcd5c
2 changed files with 3 additions and 32 deletions

View File

@@ -190,7 +190,7 @@ fn split_value(
concat: Opcode,
repairs: &mut Vec<Repair>,
) -> (Value, Value) {
let value = pos.func.dfg.resolve_copies(value);
let value = pos.func.dfg.resolve_aliases(value);
let mut reuse = None;
match pos.func.dfg.value_def(value) {
@@ -293,7 +293,7 @@ fn add_repair(
///
/// This function resolves `v11` to `v1` and `v12` to `v2`.
fn resolve_splits(dfg: &ir::DataFlowGraph, value: Value) -> Value {
let value = dfg.resolve_copies(value);
let value = dfg.resolve_aliases(value);
// Deconstruct a split instruction.
let split_res;