util_dynarray_fini(&last_read[i]);
util_dynarray_fini(&last_write[i]);
}
+
+ free(last_read);
+ free(last_write);
}
/* Does the mask cover more than a scalar? */
mir_foreach_instr_in_block_scheduled_rev(block, ins) {
list_add(&ins->link, &block->instructions);
}
+
+ free(instructions); /* Allocated by flatten_mir() */
+ free(worklist);
}
/* When we're 'squeezing down' the values in the IR, we maintain a hash
mir_foreach_instr_global(ctx, ins) {
ins->hint = false;
}
+
+ free(cost);
}
void
mir_squeeze_index(ctx);
mir_invalidate_liveness(ctx);
- l = NULL;
+ if (l) {
+ lcra_free(l);
+ l = NULL;
+ }
+
l = allocate_registers(ctx, &spilled);
} while(spilled && ((iter_count--) > 0));
ctx->tls_size = spill_count * 16;
install_registers(ctx, l);
+
+ lcra_free(l);
}