In codegen_ir_compile(), rearrange order of register lookups and order barrier flushing to reduce pointless writes of temporary registers.
This commit is contained in:
parent
095cf53265
commit
d66731f85a
1 changed files with 7 additions and 2 deletions
|
|
@ -33,8 +33,6 @@ void codegen_ir_compile(ir_data_t *ir, codeblock_t *block)
|
|||
|
||||
if (uop->type & UOP_TYPE_BARRIER)
|
||||
codegen_reg_flush_invalidate(ir, block);
|
||||
else if (uop->type & UOP_TYPE_ORDER_BARRIER)
|
||||
codegen_reg_flush(ir, block);
|
||||
|
||||
if (uop->type & UOP_TYPE_JUMP_DEST)
|
||||
{
|
||||
|
|
@ -62,6 +60,13 @@ void codegen_ir_compile(ir_data_t *ir, codeblock_t *block)
|
|||
{
|
||||
uop->src_reg_c_real = codegen_reg_alloc_read_reg(block, uop->src_reg_c, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (uop->type & UOP_TYPE_ORDER_BARRIER)
|
||||
codegen_reg_flush(ir, block);
|
||||
|
||||
if (uop->type & UOP_TYPE_PARAMS_REGS)
|
||||
{
|
||||
if (uop->dest_reg_a.reg != IREG_INVALID)
|
||||
{
|
||||
uop->dest_reg_a_real = codegen_reg_alloc_write_reg(block, uop->dest_reg_a);
|
||||
|
|
|
|||
Loading…
Reference in a new issue