From: Wolfgang Bumiller Date: Fri, 21 Dec 2012 10:33:44 +0000 (+0100) Subject: Rename ir_function_pass_tailcall->tailrecursion; Take -fadjust-vector-fields into... X-Git-Tag: 0.2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=48ba6a618977a1ffdab752db513368035763d452;p=xonotic%2Fgmqcc.git Rename ir_function_pass_tailcall->tailrecursion; Take -fadjust-vector-fields into account when storing field type return-values from functions --- diff --git a/ir.c b/ir.c index 84832fe..f71e75b 100644 --- a/ir.c +++ b/ir.c @@ -638,7 +638,7 @@ bool ir_function_pass_peephole(ir_function *self) return true; } -bool ir_function_pass_tailcall(ir_function *self) +bool ir_function_pass_tailrecursion(ir_function *self) { size_t b, p; @@ -738,8 +738,8 @@ bool ir_function_finalize(ir_function *self) } if (OPTS_OPTIMIZATION(OPTIM_TAIL_RECURSION)) { - if (!ir_function_pass_tailcall(self)) { - irerror(self->context, "tailcall optimization pass broke something in `%s`", self->name); + if (!ir_function_pass_tailrecursion(self)) { + irerror(self->context, "tail-recursion optimization pass broke something in `%s`", self->name); return false; } } @@ -2913,8 +2913,8 @@ tailcall: if (retvalue && retvalue->store != store_return && vec_size(retvalue->life)) { /* not to be kept in OFS_RETURN */ - if (retvalue->vtype == TYPE_FIELD) - stmt.opcode = field_store_instr[retvalue->vtype]; + if (retvalue->vtype == TYPE_FIELD && OPTS_FLAG(ADJUST_VECTOR_FIELDS)) + stmt.opcode = field_store_instr[retvalue->fieldtype]; else stmt.opcode = type_store_instr[retvalue->vtype]; stmt.o1.u1 = OFS_RETURN;