Skip to content

Commit

Permalink
Change name and type of last parameter in ir_param()
Browse files Browse the repository at this point in the history
Make it more meaningful

Signed-off-by: Tony Su <[email protected]>
  • Loading branch information
Tony Su committed May 20, 2023
1 parent 2be7fbc commit c8d32ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,12 +1441,12 @@ static ir_ref ir_find_aliasing_load(ir_ctx *ctx, ir_ref ref, ir_type type, ir_re

/* IR Construction API */

ir_ref _ir_PARAM(ir_ctx *ctx, ir_type type, const char* name, ir_ref num)
ir_ref _ir_PARAM(ir_ctx *ctx, ir_type type, const char* name, int pos)
{
IR_ASSERT(ctx->control);
IR_ASSERT(ctx->ir_base[ctx->control].op == IR_START);
IR_ASSERT(ctx->insns_count == num + 1);
return ir_param(ctx, type, ctx->control, name, num);
IR_ASSERT(ctx->insns_count == pos + 1);
return ir_param(ctx, type, ctx->control, name, pos);
}

ir_ref _ir_VAR(ir_ctx *ctx, ir_type type, const char* name)
Expand Down
2 changes: 1 addition & 1 deletion ir_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ ir_ref _ir_ADD_OFFSET(ir_ctx *ctx, ir_ref addr, uintptr_t offset);
ir_ref _ir_PHI_2(ir_ctx *ctx, ir_ref src1, ir_ref src2);
ir_ref _ir_PHI_N(ir_ctx *ctx, ir_ref n, ir_ref *inputs);
void _ir_PHI_SET_OP(ir_ctx *ctx, ir_ref phi, ir_ref pos, ir_ref src);
ir_ref _ir_PARAM(ir_ctx *ctx, ir_type type, const char* name, ir_ref num);
ir_ref _ir_PARAM(ir_ctx *ctx, ir_type type, const char* name, int pos);
ir_ref _ir_VAR(ir_ctx *ctx, ir_type type, const char* name);
ir_ref _ir_CALL(ir_ctx *ctx, ir_type type, ir_ref func);
ir_ref _ir_CALL_1(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1);
Expand Down

0 comments on commit c8d32ca

Please sign in to comment.