[LLVMdev] DOTGraphTraits and GraphWriter

Prakash Prabhu prakash.prabhu at gmail.com
Mon Sep 15 15:15:44 PDT 2008


Hi all,

I have two questions related to .dot graph output. Basically, I have a
graph representing a program dependence graph like structure with
(a) multiple edges between the same pair of nodes
(b) each edge having a special (different) text/label

I implemented a template-specialized version of DotGraphTraits for the
my graph structure which given a node, uses a map_iterator (similar to
the one used in CallGraph) to get the destination node of an outgoing
edge. This works fine except that I have no clue how to support (a)
and (b) since once the destination node is returned I lose access to
the edge and cannot do any text annotation onto an edge of the graph.

Is there some other way to achieve (a) and (b) without having to
implement my own special version of GraphWriter ?

thanks,
Prakash



More information about the llvm-dev mailing list