X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=ir.c;h=420ef93069531cfbdb9385e1d66d6b342ace3bde;hp=5fde1bad5b466db162ee01d218112d36bb77cc5d;hb=f06a59e3c7eb98c21dd3e172b261fca6f8bf62c3;hpb=ffba3429fbfc70888c92c116a82e62cad01034ea diff --git a/ir.c b/ir.c index 5fde1ba..420ef93 100644 --- a/ir.c +++ b/ir.c @@ -1997,6 +1997,7 @@ void ir_function_enumerate(ir_function *self) /* each block now gets an additional "entry" instruction id * we can use to avoid point-life issues */ + self->blocks[i]->entry_id = instruction_id; ++instruction_id; self->blocks[i]->eid = i; @@ -2625,7 +2626,7 @@ static bool ir_block_life_propagate(ir_block *self, ir_block *prev, bool *change *changed = *changed || tempbool; } /* the "entry" instruction ID */ - tempbool = ir_block_living_add_instr(self, instr->eid-1); + tempbool = ir_block_living_add_instr(self, self->entry_id); *changed = *changed || tempbool; if (self->run_id == self->owner->run_id)