The dump() methods don't alter the CFG or basic blocks, so we should
mark them as const. This lets you call them even if you have a const
cfg_t - which is the case in certain portions of the code (such as live
interval handling).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
}
void
-bblock_t::dump(backend_visitor *v)
+bblock_t::dump(backend_visitor *v) const
{
int ip = this->start_ip;
for (backend_instruction *inst = (backend_instruction *)this->start;
}
void
-cfg_t::dump(backend_visitor *v)
+cfg_t::dump(backend_visitor *v) const
{
foreach_block (block, this) {
fprintf(stderr, "START B%d", block->num);
bool is_successor_of(const bblock_t *block) const;
bool can_combine_with(const bblock_t *that) const;
void combine_with(bblock_t *that);
- void dump(backend_visitor *v);
+ void dump(backend_visitor *v) const;
#endif
struct exec_node link;
void set_next_block(bblock_t **cur, bblock_t *block, int ip);
void make_block_array();
- void dump(backend_visitor *v);
+ void dump(backend_visitor *v) const;
#endif
void *mem_ctx;