X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=ir.h;h=c8e7e0c162f0caf5e12315cc9633e88429c7248c;hb=cff74493a7e44d4ef00520c270e5e825f5f17bbb;hp=a12827fc36898f8ac90036c4fcff81bff87569c5;hpb=2a2465c884a2c3c5e4f842cc883ad09b74c906ad;p=xonotic%2Fgmqcc.git diff --git a/ir.h b/ir.h index a12827f..c8e7e0c 100644 --- a/ir.h +++ b/ir.h @@ -75,6 +75,9 @@ typedef struct ir_value_s { struct ir_value_s *members[3]; struct ir_value_s *memberof; + /* arrays will never overlap with temps */ + bool unique_life; + /* For the temp allocator */ ir_life_entry_t *life; } ir_value; @@ -206,7 +209,7 @@ ir_value* ir_block_create_div(ir_block*, lex_ctx, const char *label, ir_value *l ir_instr* ir_block_create_phi(ir_block*, lex_ctx, const char *label, int vtype); ir_value* ir_phi_value(ir_instr*); void ir_phi_add(ir_instr*, ir_block *b, ir_value *v); -ir_instr* ir_block_create_call(ir_block*, lex_ctx, const char *label, ir_value *func); +ir_instr* ir_block_create_call(ir_block*, lex_ctx, const char *label, ir_value *func, bool noreturn); ir_value* ir_call_value(ir_instr*); void ir_call_param(ir_instr*, ir_value*); @@ -234,6 +237,8 @@ typedef struct ir_function_s int *params; ir_block **blocks; + uint32_t flags; + int builtin; ir_value *value; @@ -267,6 +272,10 @@ typedef struct ir_function_s struct ir_builder_s *owner; } ir_function; +#define IR_FLAG_HAS_ARRAYS (1<<1) +#define IR_FLAG_HAS_UNINITIALIZED (1<<2) +#define IR_FLAG_HAS_GOTO (1<<3) +#define IR_FLAG_MASK_NO_OVERLAP (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*); @@ -303,6 +312,10 @@ typedef struct ir_builder_s ir_value **extparams; + /* the highest func->allocated_locals */ + size_t max_locals; + uint32_t first_common_local; + const char **filenames; qcint *filestrings; /* we cache the #IMMEDIATE string here */