[LLVMdev] get TopDown DSGraph

Xiaodong Li xli3 at csil-suna22.cs.uiuc.edu
Thu Nov 21 21:48:02 PST 2002


Thanks, Chris. Actually I got the following graph from my program:

digraph DataStructures {
  label="Function fini";
  edge [arrowtail="dot"];
  size="10,7.5";
  rotate="90";

  Node0x100ae1c40 [shape=record,shape=Mrecord,label="{ %struct.a:
HIMR\n|{<g0>|<g1>|<g2>}}"];
  Node0x100ae1c40:g1 -> Node0x100ae1e00;
  Node0x100ae1c40:g2 -> Node0x100ae1fc0;
  Node0x100ae1e00 [shape=record,shape=Mrecord,label="{ %struct.a:
HIMR\n|{<g0>|<g1>|<g2>}}"];
  Node0x100ae1e00:g1 -> Node0x100ae0b30;
  Node0x100ae1e00:g2 -> Node0x100ae1d20;
  Node0x100ae0b30 [shape=record,shape=Mrecord,label="{ void: HI\n}"];
  Node0x100ae1d20 [shape=record,shape=Mrecord,label="{ void: HI\n}"];
  Node0x100ae1fc0 [shape=record,shape=Mrecord,label="{ void: HI\n}"];
  Node0x100aebf90[ plaintext=circle, label =" %my"];
  Node0x100aebf90 -> Node0x100ae1c40[arrowtail=tee,color=gray63];

If you look at it, you'll see each node has the InComplete Bit on.
But when I use 'analyze -tddatastructure file.bc' I got the graph in which
all the nodes don't have the bit on. So they are different. Could you tell
me why the results from the analyze tool and from the dsg.dump() are
different?

Besides, each time I call the getAnaysis<TDDataStructure>(), it writes out
some bu_funname.dot files to the disk. Why is that?

Thanks,
xiaodong

On Thu, 21 Nov 2002, Chris Lattner wrote:

> > I was wondering if this is the right way to get TopDown DSGraph?
> > TDDataStructures &TD = getAnalysis<TDDataStructures>();
> > F is some function
> > DSGraph &dsg = TD.getDSGraph(F);
>
> Yes, that's the right way.
>
> > I found out the DSGraph I got using this method is actually bottom up
> > DSGraph, can you let me know why?
>
> Why do you think it's a BU graph?
>
> -Chris
>
> --
> http://llvm.cs.uiuc.edu/
> http://www.nondot.org/~sabre/Projects/
>
>




More information about the llvm-dev mailing list