From: Wolfgang Bumiller Date: Tue, 25 Dec 2012 22:51:29 +0000 (+0100) Subject: Actually generate the vector member ir_values in ir_function_finalize, since ir_build... X-Git-Tag: 0.2.2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cac827d763497c5bf6965165f08dc39b95b8dc23;p=xonotic%2Fgmqcc.git Actually generate the vector member ir_values in ir_function_finalize, since ir_builder_gen_global is too late / happens after life ranges; this should fix -Ooverlap-locals Conflicts: ir.c --- diff --git a/ir.c b/ir.c index f858bb6..f7bc052 100644 --- a/ir.c +++ b/ir.c @@ -728,6 +728,8 @@ bool ir_function_pass_tailrecursion(ir_function *self) bool ir_function_finalize(ir_function *self) { + size_t i; + if (self->builtin) return true; @@ -748,6 +750,27 @@ bool ir_function_finalize(ir_function *self) if (!ir_function_naive_phi(self)) return false; + for (i = 0; i < vec_size(self->locals); ++i) { + ir_value *v = self->locals[i]; + if (v->vtype == TYPE_VECTOR || + (v->vtype == TYPE_FIELD && v->outtype == TYPE_VECTOR)) + { + ir_value_vector_member(v, 0); + ir_value_vector_member(v, 1); + ir_value_vector_member(v, 2); + } + } + for (i = 0; i < vec_size(self->values); ++i) { + ir_value *v = self->values[i]; + if (v->vtype == TYPE_VECTOR || + (v->vtype == TYPE_FIELD && v->outtype == TYPE_VECTOR)) + { + ir_value_vector_member(v, 0); + ir_value_vector_member(v, 1); + ir_value_vector_member(v, 2); + } + } + ir_function_enumerate(self); if (!ir_function_calculate_liferanges(self))