Basic DCE pass.

This commit is contained in:
Ben Vanik
2013-12-07 02:18:26 -08:00
parent c2113c116d
commit 51d0be0f0a
11 changed files with 205 additions and 8 deletions

View File

@@ -374,14 +374,17 @@ void FunctionBuilder::Comment(const char* format, ...) {
i->src2.value = i->src3.value = NULL;
}
void FunctionBuilder::Nop() {
const OpcodeInfo* FunctionBuilder::GetNopOpcode() const {
STATIC_OPCODE(
OPCODE_NOP,
"nop",
OPCODE_SIG_X,
OPCODE_FLAG_IGNORE);
return &opcode;
}
Instr* i = AppendInstr(opcode, 0);
void FunctionBuilder::Nop() {
Instr* i = AppendInstr(*GetNopOpcode(), 0);
i->src1.value = i->src2.value = i->src3.value = NULL;
}