]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
A note about how early-out in if-expressions can be translated more efficiently
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 18:22:28 +0000 (19:22 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 21 Nov 2012 18:22:28 +0000 (19:22 +0100)
ast.h

diff --git a/ast.h b/ast.h
index 989fae727b72965561444bf0289426d4f4f49496..f0e9e6b0e480d4f1f1afcd5f48c5e0ecc1213c7a 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -552,6 +552,15 @@ struct ast_function_s
     ir_block    *breakblock;
     ir_block    *continueblock;
 
+#if 0
+    /* In order for early-out logic not to go over
+     * excessive jumps, we remember their target
+     * blocks...
+     */
+    ir_block    *iftrue;
+    ir_block    *iffalse;
+#endif
+
     size_t       labelcount;
     /* in order for thread safety - for the optional
      * channel abesed multithreading... keeping a buffer