mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
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
This commit is contained in:
parent
4acea855c5
commit
5c385a3c78
1 changed files with 2 additions and 1 deletions
3
ir.c
3
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
|
||||
|
|
Loading…
Reference in a new issue