summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-10-03 13:17:58 -0700
committerEric Anholt <[email protected]>2012-10-17 12:24:00 -0700
commitc226b7a4d3f0fbba08a384e3bacd08b3a0a82531 (patch)
treeb083f9df263a49785ff0bc997938682c9a9cf359 /src/mesa/drivers
parent54679fcbcae7a2d41cb439e52e386bd811a291b4 (diff)
i965: Make the cfg reusable from the VS.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cfg.cpp20
-rw-r--r--src/mesa/drivers/dri/i965/brw_cfg.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp2
5 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index 8382764ce34..79aafb23826 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -66,7 +66,7 @@ bblock_t::make_list(void *mem_ctx)
return new(mem_ctx) bblock_link(this);
}
-cfg_t::cfg_t(fs_visitor *v)
+cfg_t::cfg_t(backend_visitor *v)
{
mem_ctx = ralloc_context(v->mem_ctx);
block_list.make_empty();
@@ -82,10 +82,10 @@ cfg_t::cfg_t(fs_visitor *v)
set_next_block(entry);
- entry->start = (fs_inst *)v->instructions.get_head();
+ entry->start = (backend_instruction *)v->instructions.get_head();
foreach_list(node, &v->instructions) {
- fs_inst *inst = (fs_inst *)node;
+ backend_instruction *inst = (backend_instruction *)node;
cur->end = inst;
@@ -112,7 +112,7 @@ cfg_t::cfg_t(fs_visitor *v)
* instructions.
*/
next = new_block();
- next->start = (fs_inst *)inst->next;
+ next->start = (backend_instruction *)inst->next;
cur_if->add_successor(mem_ctx, next);
set_next_block(next);
@@ -122,7 +122,7 @@ cfg_t::cfg_t(fs_visitor *v)
cur->add_successor(mem_ctx, cur_endif);
next = new_block();
- next->start = (fs_inst *)inst->next;
+ next->start = (backend_instruction *)inst->next;
cur_if->add_successor(mem_ctx, next);
cur_else = next;
@@ -130,7 +130,7 @@ cfg_t::cfg_t(fs_visitor *v)
break;
case BRW_OPCODE_ENDIF:
- cur_endif->start = (fs_inst *)inst->next;
+ cur_endif->start = (backend_instruction *)inst->next;
cur->add_successor(mem_ctx, cur_endif);
set_next_block(cur_endif);
@@ -159,7 +159,7 @@ cfg_t::cfg_t(fs_visitor *v)
* instructions.
*/
next = new_block();
- next->start = (fs_inst *)inst->next;
+ next->start = (backend_instruction *)inst->next;
cur->add_successor(mem_ctx, next);
cur_do = next;
@@ -170,7 +170,7 @@ cfg_t::cfg_t(fs_visitor *v)
cur->add_successor(mem_ctx, cur_do);
next = new_block();
- next->start = (fs_inst *)inst->next;
+ next->start = (backend_instruction *)inst->next;
if (inst->predicate)
cur->add_successor(mem_ctx, next);
@@ -181,7 +181,7 @@ cfg_t::cfg_t(fs_visitor *v)
cur->add_successor(mem_ctx, cur_while);
next = new_block();
- next->start = (fs_inst *)inst->next;
+ next->start = (backend_instruction *)inst->next;
if (inst->predicate)
cur->add_successor(mem_ctx, next);
@@ -189,7 +189,7 @@ cfg_t::cfg_t(fs_visitor *v)
break;
case BRW_OPCODE_WHILE:
- cur_while->start = (fs_inst *)inst->next;
+ cur_while->start = (backend_instruction *)inst->next;
cur->add_successor(mem_ctx, cur_do);
set_next_block(cur_while);
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h
index 4b015e34654..3b031df938b 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.h
+++ b/src/mesa/drivers/dri/i965/brw_cfg.h
@@ -55,8 +55,8 @@ public:
void add_successor(void *mem_ctx, bblock_t *successor);
- fs_inst *start;
- fs_inst *end;
+ backend_instruction *start;
+ backend_instruction *end;
int start_ip;
int end_ip;
@@ -78,7 +78,7 @@ public:
return node;
}
- cfg_t(fs_visitor *v);
+ cfg_t(backend_visitor *v);
~cfg_t();
bblock_t *new_block();
void set_next_block(bblock_t *block);
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 1275e697097..2fff6888335 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -201,7 +201,7 @@ fs_visitor::opt_copy_propagate_local(void *mem_ctx, bblock_t *block)
int acp_count = 16;
exec_list acp[acp_count];
- for (fs_inst *inst = block->start;
+ for (fs_inst *inst = (fs_inst *)block->start;
inst != block->end->next;
inst = (fs_inst *)inst->next) {
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index 49584334c0c..70c143af90e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -87,7 +87,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
void *mem_ctx = ralloc_context(this->mem_ctx);
- for (fs_inst *inst = block->start;
+ for (fs_inst *inst = (fs_inst *)block->start;
inst != block->end->next;
inst = (fs_inst *) inst->next) {
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 b0065145d1d..d7bb7213676 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
@@ -58,7 +58,7 @@ fs_live_variables::setup_def_use()
if (b > 0)
assert(cfg->blocks[b - 1]->end_ip == ip - 1);
- for (fs_inst *inst = block->start;
+ for (fs_inst *inst = (fs_inst *)block->start;
inst != block->end->next;
inst = (fs_inst *)inst->next) {