]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
mask -Olocal-temps by IR_FLAG_MASK_NO_LOCAL_TEMPS which now equals IR_FLAG_MASK_NO_OV...
authorWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 13:02:45 +0000 (14:02 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 13:03:54 +0000 (14:03 +0100)
ir.c
ir.h

diff --git a/ir.c b/ir.c
index bd8f12fb20f79a1d2a72ec4ec6b6d9aea981fb13..0de15105bad8cdca780c13c7f3764bbdddf51126 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -2204,7 +2204,7 @@ bool ir_function_allocate_locals(ir_function *self)
     for (i = 0; i < vec_size(self->locals); ++i)
     {
         v = self->locals[i];
-        if (!OPTS_OPTIMIZATION(OPTIM_LOCAL_TEMPS)) {
+        if ((self->flags & IR_FLAG_MASK_NO_LOCAL_TEMPS) || !OPTS_OPTIMIZATION(OPTIM_LOCAL_TEMPS)) {
             v->locked      = true;
             v->unique_life = true;
         }
diff --git a/ir.h b/ir.h
index c2c94a1771d0f2b54c40cb83e41fb0df55d0a08b..a15607c3ac0a72ec7427e2b3cc79edc63104af97 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -281,7 +281,8 @@ typedef struct ir_function_s
 #define IR_FLAG_HAS_UNINITIALIZED (1<<2)
 #define IR_FLAG_HAS_GOTO          (1<<3)
 #define IR_FLAG_INCLUDE_DEF       (1<<4)
-#define IR_FLAG_MASK_NO_OVERLAP (IR_FLAG_HAS_ARRAYS | IR_FLAG_HAS_UNINITIALIZED)
+#define IR_FLAG_MASK_NO_OVERLAP     (IR_FLAG_HAS_ARRAYS | IR_FLAG_HAS_UNINITIALIZED)
+#define IR_FLAG_MASK_NO_LOCAL_TEMPS (IR_FLAG_HAS_ARRAYS | IR_FLAG_HAS_UNINITIALIZED)
 
 ir_function* ir_function_new(struct ir_builder_s *owner, int returntype);
 void         ir_function_delete(ir_function*);