From: Wolfgang (Blub) Bumiller Date: Thu, 3 May 2012 12:01:56 +0000 (+0200) Subject: naive_phi now recognizes both store_local and store_value as non-global, create_store... X-Git-Tag: 0.1-rc1~502 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=5c385a3c782fb3bd6c5aadc2c485c325baac33ad;p=xonotic%2Fgmqcc.git naive_phi now recognizes both store_local and store_value as non-global, create_store prints the operand names on an invalid store to a value of store-type store_value --- diff --git a/ir.c b/ir.c index a390ad7..56d961a 100644 --- a/ir.c +++ b/ir.c @@ -620,6 +620,7 @@ bool ir_block_create_store_op(ir_block *self, int op, ir_value *target, ir_value { if (target->store == store_value) { fprintf(stderr, "cannot store to an SSA value\n"); + fprintf(stderr, "trying to store: %s <- %s\n", target->name, what->name); return false; } else { ir_instr *in = ir_instr_new(self, op); @@ -1277,7 +1278,7 @@ static bool ir_block_naive_phi(ir_block *self) if (v->writes[w]->_ops[0] == v) v->writes[w]->_ops[0] = instr->_ops[0]; - if (old->store != store_local) + if (old->store != store_value && old->store != store_local) { /* If it originally wrote to a global we need to store the value * there as welli