self->members[0] = NULL;
self->members[1] = NULL;
self->members[2] = NULL;
+ self->memberof = NULL;
MEM_VECTOR_INIT(self, life);
return self;
return NULL;
}
+ m->memberof = self;
return m;
}
ir_block *block = self->blocks[0];
for (i = 0; i < block->living_count; ++i) {
ir_value *v = block->living[i];
- if (v->name[0] == '#' || v->name[0] == '%')
+ if (v->memberof || v->store != store_local)
continue;
if (irwarning(v->context, WARN_USED_UNINITIALIZED,
"variable `%s` may be used uninitialized in this function", v->name))
for (p = 0; p < instr->phi_count; ++p)
{
value = instr->phi[p].value;
+ if (value->memberof)
+ value = value->memberof;
if (!ir_block_living_find(self, value, NULL) &&
!ir_block_living_add(self, value))
{
for (p = 0; p < instr->params_count; ++p)
{
value = instr->params[p];
+ if (value->memberof)
+ value = value->memberof;
if (!ir_block_living_find(self, value, NULL) &&
!ir_block_living_add(self, value))
{
continue;
value = instr->_ops[o];
+ if (value->memberof)
+ value = value->memberof;
/* We only care about locals */
/* we also calculate parameter liferanges so that locals
/* for acessing vectors */
struct ir_value_s *members[3];
+ struct ir_value_s *memberof;
/* For the temp allocator */
MEM_VECTOR_MAKE(ir_life_entry_t, life);