diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.cpp | 44 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cfg.h | 28 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 24 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 4 |
8 files changed, 65 insertions, 65 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp index 575444678f1..539cb084d4e 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.cpp +++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp @@ -28,23 +28,23 @@ #include "brw_fs.h" #include "brw_cfg.h" -/** @file brw_fs_cfg.cpp +/** @file brw_cfg_t.cpp * * Walks the shader instructions generated and creates a set of basic * blocks with successor/predecessor edges connecting them. */ -static fs_bblock * +static bblock_t * pop_stack(exec_list *list) { - fs_bblock_link *link = (fs_bblock_link *)list->get_tail(); - fs_bblock *block = link->block; + bblock_link *link = (bblock_link *)list->get_tail(); + bblock_t *block = link->block; link->remove(); return block; } -fs_bblock::fs_bblock() +bblock_t::bblock_t() { start = NULL; end = NULL; @@ -54,19 +54,19 @@ fs_bblock::fs_bblock() } void -fs_bblock::add_successor(void *mem_ctx, fs_bblock *successor) +bblock_t::add_successor(void *mem_ctx, bblock_t *successor) { successor->parents.push_tail(this->make_list(mem_ctx)); children.push_tail(successor->make_list(mem_ctx)); } -fs_bblock_link * -fs_bblock::make_list(void *mem_ctx) +bblock_link * +bblock_t::make_list(void *mem_ctx) { - return new(mem_ctx) fs_bblock_link(this); + return new(mem_ctx) bblock_link(this); } -fs_cfg::fs_cfg(fs_visitor *v) +cfg_t::cfg_t(fs_visitor *v) { mem_ctx = ralloc_context(v->mem_ctx); block_list.make_empty(); @@ -74,11 +74,11 @@ fs_cfg::fs_cfg(fs_visitor *v) ip = 0; cur = NULL; - fs_bblock *entry = new_block(); - fs_bblock *cur_if = NULL, *cur_else = NULL, *cur_endif = NULL; - fs_bblock *cur_do = NULL, *cur_while = NULL; + bblock_t *entry = new_block(); + bblock_t *cur_if = NULL, *cur_else = NULL, *cur_endif = NULL; + bblock_t *cur_do = NULL, *cur_while = NULL; exec_list if_stack, else_stack, endif_stack, do_stack, while_stack; - fs_bblock *next; + bblock_t *next; set_next_block(entry); @@ -209,21 +209,21 @@ fs_cfg::fs_cfg(fs_visitor *v) make_block_array(); } -fs_cfg::~fs_cfg() +cfg_t::~cfg_t() { ralloc_free(mem_ctx); } -fs_bblock * -fs_cfg::new_block() +bblock_t * +cfg_t::new_block() { - fs_bblock *block = new(mem_ctx) fs_bblock(); + bblock_t *block = new(mem_ctx) bblock_t(); return block; } void -fs_cfg::set_next_block(fs_bblock *block) +cfg_t::set_next_block(bblock_t *block) { if (cur) { assert(cur->end->next == block->start); @@ -237,13 +237,13 @@ fs_cfg::set_next_block(fs_bblock *block) } void -fs_cfg::make_block_array() +cfg_t::make_block_array() { - blocks = ralloc_array(mem_ctx, fs_bblock *, num_blocks); + blocks = ralloc_array(mem_ctx, bblock_t *, num_blocks); int i = 0; foreach_list(block_node, &block_list) { - fs_bblock_link *link = (fs_bblock_link *)block_node; + bblock_link *link = (bblock_link *)block_node; blocks[i++] = link->block; } assert(i == num_blocks); diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h index 0038f929737..4b015e34654 100644 --- a/src/mesa/drivers/dri/i965/brw_cfg.h +++ b/src/mesa/drivers/dri/i965/brw_cfg.h @@ -27,17 +27,17 @@ #include "brw_fs.h" -class fs_bblock_link : public exec_node { +class bblock_link : public exec_node { public: - fs_bblock_link(fs_bblock *block) + bblock_link(bblock_t *block) : block(block) { } - fs_bblock *block; + bblock_t *block; }; -class fs_bblock { +class bblock_t { public: static void* operator new(size_t size, void *ctx) { @@ -49,11 +49,11 @@ public: return node; } - fs_bblock_link *make_list(void *mem_ctx); + bblock_link *make_list(void *mem_ctx); - fs_bblock(); + bblock_t(); - void add_successor(void *mem_ctx, fs_bblock *successor); + void add_successor(void *mem_ctx, bblock_t *successor); fs_inst *start; fs_inst *end; @@ -66,7 +66,7 @@ public: int block_num; }; -class fs_cfg { +class cfg_t { public: static void* operator new(size_t size, void *ctx) { @@ -78,17 +78,17 @@ public: return node; } - fs_cfg(fs_visitor *v); - ~fs_cfg(); - fs_bblock *new_block(); - void set_next_block(fs_bblock *block); + cfg_t(fs_visitor *v); + ~cfg_t(); + bblock_t *new_block(); + void set_next_block(bblock_t *block); void make_block_array(); /** @{ * * Used while generating the block list. */ - fs_bblock *cur; + bblock_t *cur; int ip; /** @} */ @@ -96,6 +96,6 @@ public: /** Ordered list (by ip) of basic blocks */ exec_list block_list; - fs_bblock **blocks; + bblock_t **blocks; int num_blocks; }; diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index bfbcad676d2..87cbbe22538 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -50,7 +50,7 @@ extern "C" { #include "glsl/glsl_types.h" #include "glsl/ir.h" -class fs_bblock; +class bblock_t; namespace { class acp_entry; } @@ -242,11 +242,11 @@ public: void calculate_live_intervals(); bool opt_algebraic(); bool opt_cse(); - bool opt_cse_local(fs_bblock *block, exec_list *aeb); + bool opt_cse_local(bblock_t *block, exec_list *aeb); bool opt_copy_propagate(); bool try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry); bool try_constant_propagate(fs_inst *inst, acp_entry *entry); - bool opt_copy_propagate_local(void *mem_ctx, fs_bblock *block); + bool opt_copy_propagate_local(void *mem_ctx, bblock_t *block); bool register_coalesce(); bool register_coalesce_2(); bool compute_to_mrf(); @@ -422,7 +422,7 @@ public: int force_uncompressed_stack; int force_sechalf_stack; - class fs_bblock *bblock; + class bblock_t *bblock; }; bool brw_do_channel_expressions(struct exec_list *instructions); 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 f51f7b944e7..7ab1c5113aa 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -195,7 +195,7 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) * list. */ bool -fs_visitor::opt_copy_propagate_local(void *mem_ctx, fs_bblock *block) +fs_visitor::opt_copy_propagate_local(void *mem_ctx, bblock_t *block) { bool progress = false; int acp_count = 16; @@ -273,10 +273,10 @@ fs_visitor::opt_copy_propagate() bool progress = false; void *mem_ctx = ralloc_context(this->mem_ctx); - fs_cfg cfg(this); + cfg_t cfg(this); for (int b = 0; b < cfg.num_blocks; b++) { - fs_bblock *block = cfg.blocks[b]; + bblock_t *block = cfg.blocks[b]; progress = opt_copy_propagate_local(mem_ctx, block) || progress; } diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp index bb3ba66350d..a231868c0b9 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp @@ -81,7 +81,7 @@ operands_match(fs_reg *xs, fs_reg *ys) } bool -fs_visitor::opt_cse_local(fs_bblock *block, exec_list *aeb) +fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb) { bool progress = false; @@ -176,10 +176,10 @@ fs_visitor::opt_cse() { bool progress = false; - fs_cfg cfg(this); + cfg_t cfg(this); for (int b = 0; b < cfg.num_blocks; b++) { - fs_bblock *block = cfg.blocks[b]; + bblock_t *block = cfg.blocks[b]; exec_list aeb; progress = opt_cse_local(block, &aeb) || progress; diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp index ec39c0a69ec..55c36ca69a7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp @@ -738,9 +738,9 @@ fs_visitor::generate_code() } } - fs_cfg *cfg = NULL; + cfg_t *cfg = NULL; if (unlikely(INTEL_DEBUG & DEBUG_WM)) - cfg = new(mem_ctx) fs_cfg(this); + cfg = new(mem_ctx) cfg_t(this); foreach_list(node, &this->instructions) { fs_inst *inst = (fs_inst *)node; @@ -748,15 +748,15 @@ fs_visitor::generate_code() if (unlikely(INTEL_DEBUG & DEBUG_WM)) { foreach_list(node, &cfg->block_list) { - fs_bblock_link *link = (fs_bblock_link *)node; - fs_bblock *block = link->block; + bblock_link *link = (bblock_link *)node; + bblock_t *block = link->block; if (block->start == inst) { printf(" START B%d", block->block_num); foreach_list(predecessor_node, &block->parents) { - fs_bblock_link *predecessor_link = - (fs_bblock_link *)predecessor_node; - fs_bblock *predecessor_block = predecessor_link->block; + bblock_link *predecessor_link = + (bblock_link *)predecessor_node; + bblock_t *predecessor_block = predecessor_link->block; printf(" <-B%d", predecessor_block->block_num); } printf("\n"); @@ -1020,15 +1020,15 @@ fs_visitor::generate_code() last_native_insn_offset, p->next_insn_offset); foreach_list(node, &cfg->block_list) { - fs_bblock_link *link = (fs_bblock_link *)node; - fs_bblock *block = link->block; + bblock_link *link = (bblock_link *)node; + bblock_t *block = link->block; if (block->end == inst) { printf(" END B%d", block->block_num); foreach_list(successor_node, &block->children) { - fs_bblock_link *successor_link = - (fs_bblock_link *)successor_node; - fs_bblock *successor_block = successor_link->block; + bblock_link *successor_link = + (bblock_link *)successor_node; + bblock_t *successor_block = successor_link->block; printf(" ->B%d", successor_block->block_num); } printf("\n"); 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 667f1e85a59..f41d6332dd0 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp @@ -52,7 +52,7 @@ fs_live_variables::setup_def_use() int ip = 0; for (int b = 0; b < cfg->num_blocks; b++) { - fs_bblock *block = cfg->blocks[b]; + bblock_t *block = cfg->blocks[b]; assert(ip == block->start_ip); if (b > 0) @@ -118,8 +118,8 @@ fs_live_variables::compute_live_variables() /* Update liveout */ foreach_list(block_node, &cfg->blocks[b]->children) { - fs_bblock_link *link = (fs_bblock_link *)block_node; - fs_bblock *block = link->block; + bblock_link *link = (bblock_link *)block_node; + bblock_t *block = link->block; for (int i = 0; i < num_vars; i++) { if (bd[block->block_num].livein[i] && !bd[b].liveout[i]) { @@ -132,7 +132,7 @@ fs_live_variables::compute_live_variables() } } -fs_live_variables::fs_live_variables(fs_visitor *v, fs_cfg *cfg) +fs_live_variables::fs_live_variables(fs_visitor *v, cfg_t *cfg) : v(v), cfg(cfg) { mem_ctx = ralloc_context(cfg->mem_ctx); @@ -203,7 +203,7 @@ fs_visitor::calculate_live_intervals() } /* Now, extend those intervals using our analysis of control flow. */ - fs_cfg cfg(this); + cfg_t cfg(this); fs_live_variables livevars(this, &cfg); for (int b = 0; b < cfg.num_blocks; b++) { diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.h b/src/mesa/drivers/dri/i965/brw_fs_live_variables.h index 065f3132060..5f7e67e5138 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.h +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.h @@ -62,14 +62,14 @@ public: return node; } - fs_live_variables(fs_visitor *v, fs_cfg *cfg); + fs_live_variables(fs_visitor *v, cfg_t *cfg); ~fs_live_variables(); void setup_def_use(); void compute_live_variables(); fs_visitor *v; - fs_cfg *cfg; + cfg_t *cfg; void *mem_ctx; int num_vars; |