diff --git a/ir/builder.c b/ir/builder.c index 9f21493..58ff6ff 100644 --- a/ir/builder.c +++ b/ir/builder.c @@ -116,9 +116,6 @@ void vx_IrOp_init(vx_IrOp *op, const vx_IrOpType type, vx_IrBlock *parent) { - op->types = NULL; - op->types_len = 0; - op->outs = NULL; op->outs_len = 0; @@ -133,13 +130,6 @@ void vx_IrOp_init(vx_IrOp *op, op->states_len = 0; } -void vx_IrOp_add_type(vx_IrOp *op, - vx_IrType *type) -{ - op->types = realloc(op->types, sizeof(vx_IrType) * (op->types_len + 1)); - op->types[op->types_len ++] = type; -} - void vx_IrOp_add_out(vx_IrOp *op, vx_IrVar var, vx_IrType *type) @@ -165,7 +155,6 @@ void vx_IrOp_add_param_s(vx_IrOp *op, void vx_IrOp_destroy(vx_IrOp *op) { vx_IrOp_remove_params(op); - free(op->types); free(op->outs); free(op->states); } diff --git a/ir/dump.c b/ir/dump.c index 2d8f00d..160eaf3 100644 --- a/ir/dump.c +++ b/ir/dump.c @@ -159,19 +159,6 @@ void vx_IrOp_dump(const vx_IrOp *op, FILE *out, size_t indent) { fprintf(out, "%s ", vx_IrOpType_names[op->id]); - if (op->types_len > 0) { - fputc('<', out); - - for (size_t i = 0; i < op->types_len; i ++) { - if (i > 0) - fputc(',', out); - // TODO - //fputs(op->types[i], out); - } - - fputc('>', out); - } - for (size_t j = 0; j < op->params_len; j ++) { if (j > 0) fputc(' ', out); diff --git a/ir/ir.h b/ir/ir.h index a3cefc9..6df5f49 100644 --- a/ir/ir.h +++ b/ir/ir.h @@ -279,9 +279,6 @@ typedef struct { } vx_IrTypedVar; struct vx_IrOp_s { - vx_IrType **types; - size_t types_len; - vx_IrTypedVar *outs; size_t outs_len; @@ -344,7 +341,6 @@ void vx_IrView_deep_traverse(vx_IrView top, void (*callback)(vx_IrOp *op, void * vx_IrValue *vx_IrOp_param(const vx_IrOp *op, vx_IrName name); void vx_IrOp_init(vx_IrOp *op, vx_IrOpType type, vx_IrBlock *parent); -void vx_IrOp_add_type(vx_IrOp *op, vx_IrType *type); void vx_IrOp_add_out(vx_IrOp *op, vx_IrVar v, vx_IrType *t); void vx_IrOp_add_param_s(vx_IrOp *op, vx_IrName name, vx_IrValue val); void vx_IrOp_add_param(vx_IrOp *op, vx_IrNamedValue p); diff --git a/ir/transform/normalize.c b/ir/transform/normalize.c index 72848ef..9204b43 100644 --- a/ir/transform/normalize.c +++ b/ir/transform/normalize.c @@ -18,7 +18,7 @@ void vx_CIrBlock_normalize(vx_IrBlock *block) vx_IrBlock *b_end = vx_IrOp_param(op, VX_IR_NAME_LOOP_ENDEX)->block; vx_IrBlock *b_do = vx_IrOp_param(op, VX_IR_NAME_LOOP_DO)->block; // we free manually because we don't want to free blocks if should_free - free(op->types); // TODO: ^ is stupid + // TODO: ^ is stupid free(op->outs); free(op->states); vx_IrOp_remove_params(op);