From cac827d763497c5bf6965165f08dc39b95b8dc23 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 25 Dec 2012 23:51:29 +0100 Subject: [PATCH] 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 --- ir.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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)) -- 2.39.2