[LLVMdev] DSnode type question

Chris Lattner sabre at nondot.org
Thu Nov 21 21:16:00 PST 2002


> When I use analyze to construct the DSGraph for the lists.c program in
> test/Programs/SingleSource/Shootout directory. I found out the heap node
> in the function test_list() all have type FOLDED:R. I was wondering why
> it's not heapnode anymore? My pass need to use this type information to
> determine whether a node is heap node. Is there any way I can know this is
> a heap node in this case?

Folded nodes are nodes where the type information in LLVM isn't good
enough to distinguish fields, therefore we need to fold the nodes to be
conservatively correct, even though doing so loses field sensitivity.

Pointer/Alias analysis is an undecidable problem, so all [sound] analyses
must have some way to represent conservativism.  This is one of the ways
that the DSGraphs do it.  In this case, your pass should do something
conservative.

Despite this, we should not be tossing away the type of memory object it
is (ie heap allocation).  I will look into this tommorow to see what is
going on.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list