[LLVMdev] Graphviz and LLVM-TV

Tobias Grosser grosser at fim.uni-passau.de
Thu Aug 13 13:17:19 PDT 2009


Hi Ioannis,

On Thu, 2009-08-13 at 19:31 +0100, Ioannis Nousias wrote: 
> Thanks Tobi for the tip.
> 
> however I also need the Data-Flow-Graph of each basic block/functions. 
> As I said, I need a view of how the instructions 'link' to each other 
> (via registers or memory aliasing or whatnot)


I believe that there is not yet a DOT printer for this kind of
information.

grep DOTGraphTraits -R *

should give you all data types, for which dot printing is implemented,
and the data flow does not seem to exist. However there is already a
graph representation of the data flow information in
"include/llvm/Support/DataFlow.h":

-------------------------------------------------------------------------
This file defines specializations of GraphTraits that allows Use-Def and
Def-Use relations to be treated as proper graphs for generic algorithms.
-------------------------------------------------------------------------

It should be easy to write the DOTPrinter for this data type. You can
take the CFGPrinter as reference.

Tobi




More information about the llvm-dev mailing list