Optimise out redundant uOPs, where the output register is never read.
This commit is contained in:
parent
84622584e2
commit
3f2d9ecf87
4 changed files with 200 additions and 57 deletions
|
|
@ -21,6 +21,8 @@ void codegen_ir_compile(ir_data_t *ir, codeblock_t *block)
|
|||
int jump_target_at_end = -1;
|
||||
int c;
|
||||
|
||||
codegen_reg_mark_as_required();
|
||||
codegen_reg_process_dead_list(ir);
|
||||
block_write_data = codeblock_allocator_get_ptr(block->head_mem_block);
|
||||
block_pos = 0;
|
||||
codegen_backend_prologue(block);
|
||||
|
|
@ -45,6 +47,9 @@ void codegen_ir_compile(ir_data_t *ir, codeblock_t *block)
|
|||
}
|
||||
}
|
||||
|
||||
if ((uop->type & UOP_MASK) == UOP_INVALID)
|
||||
continue;
|
||||
|
||||
if (uop->type & UOP_TYPE_PARAMS_REGS)
|
||||
{
|
||||
codegen_reg_alloc_register(uop->dest_reg_a, uop->src_reg_a, uop->src_reg_b, uop->src_reg_c);
|
||||
|
|
|
|||
Loading…
Reference in a new issue