}
bblock_t::bblock_t(cfg_t *cfg) :
- cfg(cfg), start_ip(0), end_ip(0), num(0), cycle_count(0)
+ cfg(cfg), start_ip(0), end_ip(0), num(0)
{
instructions.make_empty();
parents.make_empty();
}
void
-bblock_t::dump(backend_shader *s) const
+bblock_t::dump() const
{
+ const backend_shader *s = this->cfg->s;
+
int ip = this->start_ip;
foreach_inst_in_block(backend_instruction, inst, this) {
fprintf(stderr, "%5d: ", ip);
}
}
-cfg_t::cfg_t(exec_list *instructions)
+cfg_t::cfg_t(const backend_shader *s, exec_list *instructions) :
+ s(s)
{
mem_ctx = ralloc_context(NULL);
block_list.make_empty();
blocks = NULL;
num_blocks = 0;
- cycle_count = 0;
bblock_t *cur = NULL;
int ip = 0;
}
void
-cfg_t::dump(backend_shader *s)
+cfg_t::dump()
{
const idom_tree *idom = (s ? &s->idom_analysis.require() : NULL);
}
fprintf(stderr, "\n");
if (s != NULL)
- block->dump(s);
+ block->dump();
fprintf(stderr, "END B%d", block->num);
foreach_list_typed(bblock_link, link, link, &block->children) {
fprintf(stderr, " %c>B%d",