]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Fix a warning
authorWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 15:04:58 +0000 (16:04 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 15:04:58 +0000 (16:04 +0100)
ir.c
ir.h

diff --git a/ir.c b/ir.c
index 5fde1bad5b466db162ee01d218112d36bb77cc5d..420ef93069531cfbdb9385e1d66d6b342ace3bde 100644 (file)
--- 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)
diff --git a/ir.h b/ir.h
index 973f89d45a49b20a0ef1613f874ebcb753fe88ef..a241ad5cad6d3601ed76eb5270a502c5dcd5946c 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -171,6 +171,7 @@ typedef struct ir_block_s
     ir_value          **living;
 
     /* For the temp-allocation */
+    size_t entry_id;
     size_t eid;
     bool   is_return;
     size_t run_id;