mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
i965: Make the cfg reusable from the VS.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
54679fcbca
commit
c226b7a4d3
5 changed files with 16 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue