]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ir.h
ir_function_create_block now takes a lex_ctx instead of copying from the function...
[xonotic/gmqcc.git] / ir.h
diff --git a/ir.h b/ir.h
index 06efa5b21600264a8c29399f37a94ead961b8030..7b5ab5e1d095e68db18bea3eddc12bc4d723a3ea 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -133,6 +133,9 @@ typedef struct ir_instr_s
     /* For the temp-allocation */
     size_t eid;
 
+    /* For IFs */
+    bool   likely;
+
     struct ir_block_s *owner;
 } ir_instr;
 
@@ -268,7 +271,6 @@ void ir_function_collect_value(ir_function*, ir_value *value);
 
 bool ir_function_set_name(ir_function*, const char *name);
 
-ir_value* ir_function_get_local(ir_function *self, const char *name);
 ir_value* ir_function_create_local(ir_function *self, const char *name, int vtype, bool param);
 
 bool GMQCC_WARN ir_function_finalize(ir_function*);
@@ -278,11 +280,12 @@ bool ir_function_enumerate(ir_function*);
 bool ir_function_calculate_liferanges(ir_function*);
 */
 
-ir_block* ir_function_create_block(ir_function*, const char *label);
+ir_block* ir_function_create_block(lex_ctx ctx, ir_function*, const char *label);
 
 void ir_function_dump(ir_function*, char *ind, int (*oprintf)(const char*,...));
 
 /* builder */
+#define IR_HT_SIZE 1024
 typedef struct ir_builder_s
 {
     char *name;
@@ -290,6 +293,10 @@ typedef struct ir_builder_s
     ir_value    **globals;
     ir_value    **fields;
 
+    ht            htfunctions;
+    ht            htglobals;
+    ht            htfields;
+
     ir_value    **extparams;
 
     const char **filenames;