Make register copies for incompatible operands.

An instruction may have fixed operand constraints that make it
impossibly to use a single register value to satisfy two at a time.

Detect when the same value is used for multiple fixed register operands
and insert copies during the spilling pass.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-14 13:56:06 -07:00
parent 9eb0778f9b
commit 66bc0a9c8b
3 changed files with 235 additions and 31 deletions

View File

@@ -74,7 +74,7 @@ impl Ebb {
}
/// An opaque reference to an SSA value.
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, PartialOrd, Ord)]
pub struct Value(u32);
entity_impl!(Value, "v");