[LLVMdev] DSGraph questions

Vikram S. Adve vadve at cs.uiuc.edu
Mon Nov 11 06:11:01 PST 2002


Sorry, it was not yet in the CSIL tree.  I've updated it now.

--Vikram

-------------------------------------------------------------------------
 VIKRAM S. ADVE
 Assistant Professor                            E-MAIL: vadve at cs.uiuc.edu
 Department of Computer Science                 PHONE:  (217) 244-2016
 Univ. of Illinois at Urbana-Champaign          FAX:    (217) 244-6869
 1304 W. Springfield Ave.              WWW: http://www.cs.uiuc.edu/~vadve
 Urbana IL 61801-2987.
-------------------------------------------------------------------------


> -----Original Message-----
> From: Xiaodong Li [mailto:xli3 at csil-suna48.cs.uiuc.edu]
> Sent: Monday, November 11, 2002 12:01 AM
> To: Vikram Adve
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] DSGraph questions
>
>
> Dear Prof. Adve,
>
> I recently checked out the llvm using
> cvs update
> command under the llvm directory. But when I went to see the DSNode.h,
> there is no getPointerSize function. I checked the doxygen tree, it's
> there. So that means I didn't update my cvs tree correctly. Could you let
> me know how to update my CVS tree? Or there is a problem at somewhere
> else?
>
> Thanks,
> xiaodong
>
> On Sun, 10 Nov 2002, Vikram Adve wrote:
>
> > I'll try to answer these because Chris is really busy this week.
> >
> >
> > > From: Xiaodong Li <xli3 at santoor.cs.uiuc.edu>
> > > Subject: [LLVMdev] DSGraph questions
> > > Sender: llvmdev-admin at cs.uiuc.edu
> > > Date: Sun, 10 Nov 2002 11:25:53 -0600 (CST)
> > >
> > > 1. What is the difference between DSNodeHandle and DSNode? What do the
> > > functions getLink() and getSize() do?
> >
> >
> > DSNodeHandle is essentially like an edge in the DSGraph.
> > It serves two main purposes:
> > (1) It keeps track of which byte offset is being pointed to within
> >     the target node.
> > (2) It keeps track of how many objects have pointers to a DSNode,
> >     so that it can check if the number is zero and free a node
> >     (reference counting)
> >
> > getLink(Offset) returns the outgoing edge at byte offset "Offset"
> > from the current node.  (think of each node as a struct, so there
> > can be pointers at different byte offsets within the struct.)
> >
> > getSize() returns the max #bytes for any object folded into this node.
> >
> >
> > > 2. In the previous email, you mentioned that we can use
> > > DSNode::getPointerSize() to get the number of links, But I checked the
> > > doxygen documentation, there is no such member for DSNode.
> >
> >
> > Check the header file.  The doxygen docs were a little out of date
> > (but Chris has updated them now).
> >
> >
> >
> > > 3. Previously I use the following code:
> > > for( df_iterator<DSNode*> I = df_begin(pnode),
> E=df_end(pnode); I!=E; ++i)
> > > {
> > >   ...           ;
> > > }
> > > and got lots of error messages when I compile. And the reply was:
> > > >What is the type of pnode?  Guessing from the error message,
> I would think
> > > >it's a 'const DSNode*'.  You need to use either
> df_iterator<const DSNode*>
> > > >or a DSNode* argument, you can't mix them.
> > >
> > > I checked and found out that I was using
> > > DSNode *pnode = dsg->getNodeforValue(fi).getNode() to get pnode.
> > > So I think it's a DSNode.
> >
> >
> > I would have to see the error messages.  In generally, if you have any
> > const variables or functions, you will get lots of error messages unless
> > you use them very carefully.
> >
> > --Vikram
> > http://www.cs.uiuc.edu/~vadve
> >
>
>




More information about the llvm-dev mailing list