diff options
author | Matt Turner <[email protected]> | 2013-11-28 23:24:44 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-12-04 20:05:42 -0800 |
commit | d2fcdd0973ee33a2627d1dee6d78091e605af160 (patch) | |
tree | 005e7f7802eaeb3e32e33472bb960a70bd05bd64 /src/mesa/drivers | |
parent | c6450fa963b7eefbbc0ba5e00d42f1a4efba092b (diff) |
i965/cfg: Clean up cfg_t constructors.
parent_mem_ctx was unused since db47074a, so remove the two wrappers
around create() and make create() the constructor.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.cpp | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.h | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp | 2 |
9 files changed, 9 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp index 7468c5bbde9..e2817a000b9 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.cpp +++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp @@ -77,18 +77,7 @@ bblock_t::dump(backend_visitor *v) } } -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(); diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h index 4b87089d106..d0f091f8d44 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.h +++ b/src/mesa/drivers/dri/i965/brw_cfg.h @@ -73,12 +73,9 @@ class cfg_t { 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(); diff --git a/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp b/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp index 7de27e3b22e..63a3e5bbe55 100644 --- a/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp +++ b/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp @@ -39,7 +39,7 @@ dead_control_flow_eliminate(backend_visitor *v) { 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]; diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 26bac9417aa..accd9bd2bbb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -525,7 +525,7 @@ fs_visitor::opt_copy_propagate() { 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]; diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp index 27541db9be9..d8a54346a0b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp @@ -269,7 +269,7 @@ fs_visitor::opt_cse() 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]; diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 6626a8cdf16..8bb6184a136 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -1308,7 +1308,7 @@ fs_generator::generate_code(exec_list *instructions) 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; diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp index 21b261894d3..fa84c559bdb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp @@ -320,7 +320,7 @@ fs_visitor::calculate_live_intervals() 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. */ diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 73f91a06281..5222a67dab2 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -668,7 +668,7 @@ vec4_visitor::opt_set_dependency_control() 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"); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp index 5bc2f9f3896..51b9a82ac55 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp @@ -246,7 +246,7 @@ vec4_visitor::calculate_live_intervals() * 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++) { |