X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fintel%2Fcompiler%2Fbrw_cfg.cpp;h=fd88586bac703ea96f12ec864a9694c1a43d4cf0;hb=a7a0315d7fdaa0e3e698de2af043776e5da467ff;hp=e476ea3621748091eb898ac4c9970c5b4e143024;hpb=f6cdf66cd6e2515471c7944f67ddb87881c2366e;p=mesa.git diff --git a/src/intel/compiler/brw_cfg.cpp b/src/intel/compiler/brw_cfg.cpp index e476ea36217..fd88586bac7 100644 --- a/src/intel/compiler/brw_cfg.cpp +++ b/src/intel/compiler/brw_cfg.cpp @@ -63,7 +63,7 @@ push_stack(exec_list *list, void *mem_ctx, bblock_t *block) } 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(); @@ -154,8 +154,10 @@ bblock_t::combine_with(bblock_t *that) } 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); @@ -164,13 +166,13 @@ bblock_t::dump(backend_shader *s) const } } -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; @@ -499,7 +501,7 @@ cfg_t::make_block_array() } void -cfg_t::dump(backend_shader *s) +cfg_t::dump() { const idom_tree *idom = (s ? &s->idom_analysis.require() : NULL); @@ -517,7 +519,7 @@ cfg_t::dump(backend_shader *s) } 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",