]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
do the locking before processing the call-reads otherwise all the call's parameters...
authorWolfgang Bumiller <blub@speed.at>
Tue, 25 Dec 2012 22:24:31 +0000 (23:24 +0100)
committerWolfgang Bumiller <blub@speed.at>
Tue, 25 Dec 2012 22:24:31 +0000 (23:24 +0100)
ir.c

diff --git a/ir.c b/ir.c
index 7d35e7ff1d979584bad9d42103203449b09f4365..40f36deaea6e9dbf9ad94f12a052495d1d3fba8c 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -2498,6 +2498,11 @@ static bool ir_block_life_propagate(ir_block *self, ir_block *prev, bool *change
             }
         }
 
+        /* on a call, all these values must be "locked" */
+        if (instr->opcode >= INSTR_CALL0 && instr->opcode <= INSTR_CALL8) {
+            if (ir_block_living_lock(self))
+                *changed = true;
+        }
         /* call params are read operands too */
         for (p = 0; p < vec_size(instr->params); ++p)
         {
@@ -2512,11 +2517,6 @@ static bool ir_block_life_propagate(ir_block *self, ir_block *prev, bool *change
                     vec_push(self->living, value->members[mem]);
             }
         }
-        /* on a call, all these values must be "locked" */
-        if (instr->opcode >= INSTR_CALL0 && instr->opcode <= INSTR_CALL8) {
-            if (ir_block_living_lock(self))
-                *changed = true;
-        }
 
         /* (A) */
         tempbool = ir_block_living_add_instr(self, instr->eid);