mirror of
https://github.com/danog/ir.git
synced 2025-01-22 05:31:32 +01:00
Add/fix comments
This commit is contained in:
parent
d619efa0ad
commit
364669a0a1
3
ir.c
3
ir.c
@ -910,9 +910,10 @@ ir_ref ir_bind(ir_ctx *ctx, ir_ref var, ir_ref def)
|
||||
ctx->binding = ir_mem_malloc(sizeof(ir_hashtab));;
|
||||
ir_hashtab_init(ctx->binding, 16);
|
||||
}
|
||||
/* Node may be bound some VAR node or to some special spill slot (using negative "var") */
|
||||
/* Node may be bound to some VAR node or to some special spill slot (using negative "var") */
|
||||
IR_ASSERT(var < 0 || (var < ctx->insns_count && ctx->ir_base[var].op == IR_VAR));
|
||||
if (!ir_hashtab_add(ctx->binding, def, var)) {
|
||||
/* Add a copy with different binding */
|
||||
def = ir_emit2(ctx, IR_OPT(IR_COPY, ctx->ir_base[def].type), def, 1);
|
||||
ir_hashtab_add(ctx->binding, def, var);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user