search for: getnodeforvalu

Displaying 20 results from an estimated 29 matches for "getnodeforvalu".

Did you mean: getnodeforvalue
2002 Nov 11
1
[LLVMdev] about getNodeForValue()
I have a question about the getNodeForValue() function. If I have the following code: struct a *p; p = malloc( sizeof(struct a)); If I call DSGraph->getNodeForValue(p).getNode(). Will the returned Node be p node or the actual memory location node? Thanks, xiaodong
2009 Aug 07
2
[LLVMdev] DSA getNodeForValue() Returning NULL Sometimes
I'm iterating over all LoadInst and StoreInst-type Instructions in a Function, and getNodeForValue() is sometimes returning NULL. Why is this happening? Shouldn't every load from or store to memory correspond to some DSNode? --Patrick
2009 Aug 07
0
[LLVMdev] DSA getNodeForValue() Returning NULL Sometimes
On Fri, Aug 7, 2009 at 4:45 PM, Patrick Alexander Simmons<simmon12 at cs.uiuc.edu> wrote: > I'm iterating over all LoadInst and StoreInst-type Instructions in a > Function, and getNodeForValue() is sometimes returning NULL.  Why is > this happening?  Shouldn't every load from or store to memory correspond > to some DSNode? Not if the pointer is null or the pointer contains no information in the pass you are querying. Andrew
2009 Aug 07
2
[LLVMdev] DSA getNodeForValue() Returning NULL Sometimes
Andrew Lenharth wrote: > On Fri, Aug 7, 2009 at 4:45 PM, Patrick Alexander > Simmons<simmon12 at cs.uiuc.edu> wrote: > >> I'm iterating over all LoadInst and StoreInst-type Instructions in a >> Function, and getNodeForValue() is sometimes returning NULL. Why is >> this happening? Shouldn't every load from or store to memory correspond >> to some DSNode? >> > > > Not if the pointer is null or the pointer contains no information in > the pass you are querying. > > Andrew &...
2009 Aug 07
0
[LLVMdev] DSA getNodeForValue() Returning NULL Sometimes
...ons wrote: > Andrew Lenharth wrote: > >> On Fri, Aug 7, 2009 at 4:45 PM, Patrick Alexander >> Simmons<simmon12 at cs.uiuc.edu> wrote: >> >> >>> I'm iterating over all LoadInst and StoreInst-type Instructions in a >>> Function, and getNodeForValue() is sometimes returning NULL. Why is >>> this happening? Shouldn't every load from or store to memory correspond >>> to some DSNode? >>> >>> >> Not if the pointer is null or the pointer contains no information in >> the pass you ar...
2009 Aug 07
0
[LLVMdev] DSA getNodeForValue() Returning NULL Sometimes
Patrick Alexander Simmons wrote: > John Criswell wrote: > >> You can sometimes get NULL DSNodes if a previously-run transform pass >> adds pointers to the program but doesn't update DSA while claiming to >> preserve it. The pool allocation pass, for example, does this: it >> claims to preserve the DSA results (when used for SAFECode) but doesn't >>
2009 Aug 07
2
[LLVMdev] DSA getNodeForValue() Returning NULL Sometimes
John Criswell wrote: > You can sometimes get NULL DSNodes if a previously-run transform pass > adds pointers to the program but doesn't update DSA while claiming to > preserve it. The pool allocation pass, for example, does this: it > claims to preserve the DSA results (when used for SAFECode) but doesn't > properly update the DSGraph when it adds pool handles. Therefore,
2002 Dec 06
2
[LLVMdev] DSNode Question
LLVM, I am trying to equate two dsnodes across call boundries. On the Caller side we have an operand of form: sbyte * getelementptr ([20 x sbyte]* %.LC0, long 0, long 0) using getNodeForValue() yields a NULL pointer. On the Callee, the parameter is of form: sbyte * S and getNodeForValue works fine. Is there something special that must be done to access DNodes accessed using GEP? Thanks, Dave
2002 Nov 20
2
[LLVMdev] getScalarMap
> ...... > DSGraph* DSG = getAnalysis<BUDataStructures>().getDSGraph( F ); > std::map< Value*, DSNodeHandle> scalarmap = DSG->getScalarMap(); > ...... > > The scalarmap is always empty. I printed the size of the map which came > out to be zero always. But the getNodeForValue works correctly for the > same DSG, which means that the scalarmap cannot be empty. But we always > have an empty scalarmap being returned. Try capturing a reference to the map instead of copying it: std::map<Value*, DSNodeHandle> &scalarmap = DSG->getScalarMap(); -Chris &g...
2010 Dec 13
1
[LLVMdev] How can I determine safely if a CallSite is "live" in a DSGraphs context
...wind ssp". > >> If I try to call getDSCallSiteForCallSite(...) with the above mentioned > >> CallSite as argument on the DSGraph of the main method I get a failing > >> assertion when the getDSCallSiteForCallSite method tries to get the > DSNode > >> (via getNodeForValue(...)) for the "i16* null" argument. So it obviously > >> thinks it should have a node for that value (since > >> shouldHaveNodeForValue(i16* null) returns true) and thus calls > >> getNodeForValue, which raises the error (The node is not contained in > the &...
2002 Nov 10
3
[LLVMdev] DSGraph questions
...y 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. Would you please answer these questions? Thanks, Jerry
2010 Dec 13
0
[LLVMdev] How can I determine safely if a CallSite is "live" in a DSGraphs context
...in method is translated to "call void @m(i16* null) nounwind ssp". If I try to call getDSCallSiteForCallSite(...) with the above mentioned CallSite as argument on the DSGraph of the main method I get a failing assertion when the getDSCallSiteForCallSite method tries to get the DSNode (via getNodeForValue(...)) for the "i16* null" argument. So it obviously thinks it should have a node for that value (since shouldHaveNodeForValue(i16* null) returns true) and thus calls getNodeForValue, which raises the error (The node is not contained in the ScalarMap). I tried to verify if I'm using...
2002 Dec 06
1
[LLVMdev] WRT: function pointers + DSG
LLVM, What do I pass into the DSG in order to access the globals vector of functions that a function pointer may be calling. The code: CallInst *calli = dynamic_cast<CallInst*>(*i); std::vector<GlobalValue*> funcVect = theGraph.getNodeForValue(calli->getCalledFunction()).getNode()->getGlobals(); Doesn't appear to work... getCalledFunction() returns 0 Dave On Fri, 6 Dec 2002, Vikram Adve wrote: > P.S. I have also updated the CSIL tree. Just check out > TarjanSCCIterator.h. > > --Vikram > http://www.cs.uiuc....
2002 Nov 20
3
[LLVMdev] getScalarMap
> We tried that too...but still it returns an empty map. I'm not sure what's going on then. :) I think that Vikram is planning to update CVS soon, you might try that, as there has been significant updates. I'm not sure why getNodeForValue would work for you but getScalarMap doesn't... getNodeForValue USES the scalar map! :) > We also saw that Scalar Type has been removed from the DSNode types. Why > is that? Originally, LLVM values were represented in the DSGraph as DSNodes with the Scalar field set. Thus you would ha...
2002 Nov 20
2
[LLVMdev] getScalarMap
> I tried to used the getScalarMap function of the DSGraph to get the nodes > that the scalars point to in a function. But the getScalarMap returns a > null map always. Is there any problem in the getScalarMap function or is > there any "protocol" to be followed while using the function? DSGraph::getScalarMap returns a reference to the map, so this cannot be null. Do you
2002 Nov 11
1
[LLVMdev] DSGraph questions
...rom 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://w...
2010 Mar 19
3
[LLVMdev] Getting the DSNode from a Pool Descriptor?
...is a clone and what the original function is. > > If you want to find the corresponding DSNode for some instruction, you must call > > PA::FuncInfo::MapValueToOriginal( value ) > > Then you can get the DSNode from the DSGraph: > > llvm::DSNodeHandle handle = _dsg->getNodeForValue(origVal); > DSNode *node = handle.getNode(); > > origVal is obtained by calling MapValueToOriginal on a cloned Value. > > All those mappings are quite confusing. I've been thinking about splitting Pool allocation in two phases, > one in which the clones are generated (wh...
2010 Mar 19
0
[LLVMdev] Getting the DSNode from a Pool Descriptor?
...ontains the information if a function is a clone and what the original function is. If you want to find the corresponding DSNode for some instruction, you must call PA::FuncInfo::MapValueToOriginal( value ) Then you can get the DSNode from the DSGraph: llvm::DSNodeHandle handle = _dsg->getNodeForValue(origVal); DSNode *node = handle.getNode(); origVal is obtained by calling MapValueToOriginal on a cloned Value. All those mappings are quite confusing. I've been thinking about splitting Pool allocation in two phases, one in which the clones are generated (which should be internal functi...
2002 Nov 25
3
[LLVMdev] globals in DS graph
Ganesh, I modified DataStructure.cpp so that global nodes are no longer removed from any graphs. Only that file has changed. Chris, if you get a chance to do this, it would be nice if you could take a quick look at the change I made and make sure that's all that's needed. Thanks, --Vikram http://www.cs.uiuc.edu/~vadve > From: Chris Lattner <sabre at nondot.org> >
2002 Nov 08
2
[LLVMdev] Re: LLVMdev digest, Vol 1 #44 - 2 msgs
llvm, What is the best way to implement a traversal of the DS graph, starting at a scalar and processing all nodes to which the scalar allows access? Currently the links vector is not public and there is no apparent way to bound the getLink call (ie a getNumLinks call).... Dave