This is an archive of the discontinued LLVM Phabricator instance.

[Dominator] Add a way to dump a `dot` representation of the dominator tree
ClosedPublic

Authored by davide on Apr 17 2017, 5:46 PM.

Details

Summary

This is very similar to what we do for CFG and SelectionDAG.
I find it very useful when I'm in VisualStudio (or any other debugger). I can just print DT.viewGraph() and that pops a new window with the dom displayed. As far as I can tell the only other way to dump the dom is manually using DT.print(dbgs()), which for large dominator trees is not that readable.

Diff Detail

Event Timeline

davide created this revision.Apr 17 2017, 5:46 PM
dberlin accepted this revision.Apr 20 2017, 10:54 AM

So, i use -view-dom-tree, which does this.
But i can understand wanting to do it programmatically, so LGTM.

This revision is now accepted and ready to land.Apr 20 2017, 10:54 AM

(

So, i use -view-dom-tree, which does this.
But i can understand wanting to do it programmatically, so LGTM.

Thanks!

This revision was automatically updated to reflect the committed changes.