parent_mem_ctx was unused since
db47074a, so remove the two wrappers
around create() and make create() the constructor.
Reviewed-by: Eric Anholt <eric@anholt.net>
}
}
-cfg_t::cfg_t(backend_visitor *v)
-{
- create(v->mem_ctx, &v->instructions);
-}
-
-cfg_t::cfg_t(void *mem_ctx, exec_list *instructions)
-{
- create(mem_ctx, instructions);
-}
-
-void
-cfg_t::create(void *parent_mem_ctx, exec_list *instructions)
+cfg_t::cfg_t(exec_list *instructions)
{
mem_ctx = ralloc_context(NULL);
block_list.make_empty();
public:
DECLARE_RALLOC_CXX_OPERATORS(cfg_t)
- cfg_t(backend_visitor *v);
- cfg_t(void *mem_ctx, exec_list *instructions);
+ cfg_t(exec_list *instructions);
~cfg_t();
- void create(void *mem_ctx, exec_list *instructions);
-
bblock_t *new_block();
void set_next_block(bblock_t *block);
void make_block_array();
{
bool progress = false;
- cfg_t cfg(v);
+ cfg_t cfg(&v->instructions);
for (int b = 0; b < cfg.num_blocks; b++) {
bblock_t *block = cfg.blocks[b];
{
bool progress = false;
void *mem_ctx = ralloc_context(this->mem_ctx);
- cfg_t cfg(this);
+ cfg_t cfg(&instructions);
exec_list *out_acp[cfg.num_blocks];
for (int i = 0; i < cfg.num_blocks; i++)
out_acp[i] = new exec_list [ACP_HASH_SIZE];
calculate_live_intervals();
- cfg_t cfg(this);
+ cfg_t cfg(&instructions);
for (int b = 0; b < cfg.num_blocks; b++) {
bblock_t *block = cfg.blocks[b];
cfg_t *cfg = NULL;
if (unlikely(INTEL_DEBUG & DEBUG_WM))
- cfg = new(mem_ctx) cfg_t(mem_ctx, instructions);
+ cfg = new(mem_ctx) cfg_t(instructions);
foreach_list(node, instructions) {
fs_inst *inst = (fs_inst *)node;
virtual_grf_end[i] = -1;
}
- cfg_t cfg(this);
+ cfg_t cfg(&instructions);
this->live_intervals = new(mem_ctx) fs_live_variables(this, &cfg);
/* Merge the per-component live ranges to whole VGRF live ranges. */
vec4_instruction *last_mrf_write[BRW_MAX_GRF];
uint8_t mrf_channels_written[BRW_MAX_GRF];
- cfg_t cfg(this);
+ cfg_t cfg(&instructions);
assert(prog_data->total_grf ||
!"Must be called after register allocation");
* The control flow-aware analysis was done at a channel level, while at
* this point we're distilling it down to vgrfs.
*/
- cfg_t cfg(this);
+ cfg_t cfg(&instructions);
vec4_live_variables livevars(this, &cfg);
for (int b = 0; b < cfg.num_blocks; b++) {