Skip to content

Commit

Permalink
remove something
Browse files Browse the repository at this point in the history
  • Loading branch information
DevelLightStudio committed May 28, 2024
1 parent 5c15faa commit 5a5617f
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions ir/opt/ll_jumps.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,33 +66,9 @@ static void part2(vx_IrBlock *block) {
}
}

static void rmcode_before_label(vx_IrBlock *block, size_t first) {
for (size_t i = first; i < block->ops_len; i ++) {
vx_IrOp *op = &block->ops[i];

if (op->id == VX_LIR_OP_LABEL)
break;

vx_IrOp_destroy(op);
vx_IrOp_init(op, VX_IR_OP_NOP, block);
}
}

// code after tailcall before label? remove
static void part3(vx_IrBlock *block) {
for (size_t i = 0; i < block->ops_len; i ++) {
vx_IrOp *op = &block->ops[i];
if (op->id == VX_IR_OP_TAILCALL) {
rmcode_before_label(block, i + 1);
}
}
}

void vx_opt_ll_jumps(vx_IrView view, vx_IrBlock *block) {
assert(view.block == block);

part1(block);
part2(block);
part3(block);
}

0 comments on commit 5a5617f

Please sign in to comment.