]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Mask overlap-locals by -Ooverlap-locals, and count (the amount of overlapped functions)
authorWolfgang Bumiller <blub@speed.at>
Sun, 23 Dec 2012 16:40:56 +0000 (17:40 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sun, 23 Dec 2012 16:40:56 +0000 (17:40 +0100)
ir.c

diff --git a/ir.c b/ir.c
index 7312d7894ff7b3b0e002759cf2689f0f53f13653..93c0a541bff645f8756f63c7f5160009bef6a467 100644 (file)
--- 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);