From 5c385a3c782fb3bd6c5aadc2c485c325baac33ad Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Thu, 3 May 2012 14:01:56 +0200 Subject: [PATCH] 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 --- ir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2