[llvm-commits] [PATCH] DOTGraphTraits improvements

Tobias Grosser grosser at fim.uni-passau.de
Fri Nov 27 11:44:46 PST 2009


Hi,

I worked on some dotty improvements. The main changes are:

* Better layout
* Allow to hide details in -only mode
* Do not print unneeded stuff
* Several small bug fixes

The effects can be seen on this page:
http://students.fim.uni-passau.de/~grosser/llvm/dotty_patch/dotty.html

There is a the complete change set attached, as well as one big patch to
be applied at once.

These are the changes in detail:

*    Remove ":" after BB name in -view-cfg-only

*    Small PostDominatorTree improvements
    
     * Do not SEGFAULT if tree entryNode() is NULL
     * Print function names in dotty printer

*    Only print edgeSourceLabels if they are not empty
    
     Graphviz can layout the graphs better if a node does not contain
     source ports. Therefore only print the ports if the source ports
     are useful, that means are not labeled with the empty string "".
     This patch also simplifies graphs without any edgeSourceLabels e.g.
     the dominance trees.

*    Do not point edge heads to source labels
    
     If no destination label is available, just point to the node itself
     instead of pointing to some source label. Source and destination   
     labels are not related in any way.

*    Instantiate DefaultDOTGraphTraits

     Allows to query isSimple() from all methods in DOTGraphTraits.  It
     can be used as a general ShortNames flag.
     
*    Remove ShortNames from getNodeLabel
     
     Convert ShortNames to the general isSimple(). isSimple() is only
     called in the classes where it actually makes a difference.

*    Do not print edge source labels in -view-cfg-only & -dot-cfg-only

     Without branch instructions the labels are not informative and at
     the same time complicate the layout of the graph. This uses the new
     isSimple.

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-after-BB-name-in-view-cfg-only.patch
Type: text/x-patch
Size: 918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Small-PostDominatorTree-improvements.patch
Type: text/x-patch
Size: 2229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Only-print-edgeSourceLabels-if-they-are-not-empty.patch
Type: text/x-patch
Size: 3627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Do-not-point-edge-heads-to-source-labels.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Instantiate-DefaultDOTGraphTraits.patch
Type: text/x-patch
Size: 11913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Remove-ShortNames-from-getNodeLabel.patch
Type: text/x-patch
Size: 11918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Do-not-print-edge-source-labels-in-simple-CFG.patch
Type: text/x-patch
Size: 1125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: complete_patch_set-llvm_graph_printer_improvements.patch
Type: text/x-patch
Size: 21305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091127/8b04095e/attachment-0007.bin>


More information about the llvm-commits mailing list