reg_alloc: Consider bitwidth of data and registers when emitting instructions

This commit is contained in:
MerryMage
2018-01-18 13:00:07 +00:00
parent 144b629d8a
commit fff8e019dc
6 changed files with 193 additions and 79 deletions

View File

@@ -360,13 +360,17 @@ void Inst::SetArg(size_t index, Value value) {
}
void Inst::Invalidate() {
ClearArgs();
op = Opcode::Void;
}
void Inst::ClearArgs() {
for (auto& value : args) {
if (!value.IsImmediate()) {
UndoUse(value);
}
value = {};
}
op = Opcode::Void;
}
void Inst::ReplaceUsesWith(Value replacement) {