constant_propagation_pass: Prepare for IR matchers

This commit is contained in:
MerryMage 2020-04-20 20:05:32 +01:00
parent 0d7476d3ec
commit 4573511fe3
7 changed files with 203 additions and 73 deletions

View file

@ -30,7 +30,7 @@ void IdentityRemovalPass(IR::Block& block) {
}
}
if (inst.GetOpcode() == IR::Opcode::Identity) {
if (inst.GetOpcode() == IR::Opcode::Identity || inst.GetOpcode() == IR::Opcode::Void) {
iter = block.Instructions().erase(inst);
to_invalidate.push_back(&inst);
} else {