i965/cfg: Add function to generate a dot file of the dominator tree.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
b06eef05d0
commit
662c645318
|
@ -509,3 +509,13 @@ cfg_t::dump_cfg()
|
|||
}
|
||||
printf("}\n");
|
||||
}
|
||||
|
||||
void
|
||||
cfg_t::dump_domtree()
|
||||
{
|
||||
printf("digraph DominanceTree {\n");
|
||||
foreach_block(block, this) {
|
||||
printf("\t%d -> %d\n", block->idom->num, block->num);
|
||||
}
|
||||
printf("}\n");
|
||||
}
|
||||
|
|
|
@ -275,6 +275,7 @@ struct cfg_t {
|
|||
|
||||
void dump(backend_visitor *v);
|
||||
void dump_cfg();
|
||||
void dump_domtree();
|
||||
#endif
|
||||
void *mem_ctx;
|
||||
|
||||
|
|
Loading…
Reference in New Issue