From: Wolfgang Bumiller Date: Sun, 23 Dec 2012 16:40:56 +0000 (+0100) Subject: Mask overlap-locals by -Ooverlap-locals, and count (the amount of overlapped functions) X-Git-Tag: before-library~529 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c91b457054e66623915dff98dcd13f1617471f47;p=xonotic%2Fgmqcc.git Mask overlap-locals by -Ooverlap-locals, and count (the amount of overlapped functions) --- diff --git a/ir.c b/ir.c index 7312d78..93c0a54 100644 --- a/ir.c +++ b/ir.c @@ -3136,10 +3136,12 @@ static bool gen_function_locals(ir_builder *ir, ir_value *global) irfun = global->constval.vfunc; def = code_functions + irfun->code_function_def; - if (opts.g || (irfun->flags & IR_FLAG_MASK_NO_OVERLAP)) + if (opts.g || !OPTS_OPTIMIZATION(OPTIM_OVERLAP_LOCALS) || (irfun->flags & IR_FLAG_MASK_NO_OVERLAP)) firstlocal = def->firstlocal = vec_size(code_globals); - else + else { firstlocal = def->firstlocal = ir->first_common_local; + ++opts_optimizationcount[OPTIM_OVERLAP_LOCALS]; + } for (i = vec_size(code_globals); i < firstlocal + irfun->allocated_locals; ++i) vec_push(code_globals, 0);