search for: getscalarmap

Displaying 14 results from an estimated 14 matches for "getscalarmap".

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 ret...
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. Tr...
2002 Nov 20
0
[LLVMdev] getScalarMap
...aw that Scalar Type has been removed from the DSNode types. Why is that? Thanks, Ganesh On Wed, 20 Nov 2002, Chris Lattner wrote: > > ...... > > 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...
2002 Nov 20
0
[LLVMdev] getScalarMap
Specifically we did the following: ...... 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. Thanks, Ganesh On Wed, 20 Nov...
2002 Nov 19
0
[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? Thanks, Ganesh
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 have something like this: X: ( int*%X...
2002 Nov 16
5
[LLVMdev] question
Thanks Bill. One more question, when I use the DSNode iterator to traverse a node's children. The return value of I.getNode() can only be 'const DSNode *', I cannot use 'DSNode *' type. So as a result, I always get error message like this: MemLeakage.cpp:159: invalid conversion from `const DSNode*' to `DSNode*' MemLeakage.cpp:159: initializing argument 1 of `void
2002 Nov 28
2
[LLVMdev] Breakage in CVS?
The following function produces a segv when the begin() is taken from vmap, the ScalarMap... bool StaticMemAnalysis::isSingleMalloc(DSGraph* theGraph,DSNode* theNode) { int count = 0; std::map<Value*, DSNodeHandle>& vmap = theGraph->getScalarMap(); for (std::map<Value*, DSNodeHandle>::iterator i = vmap.begin(); i != vmap.end(); ++i) { if(i->second.getNode() == theNode) { if(isa<MallocInst>(i->first)) count++; } } if(count == 1) return true; return false; } This code used to work... Has something changed or i...
2002 Nov 28
2
[LLVMdev] Breakage in CVS?
On Thu, 28 Nov 2002, Chris Lattner wrote: > > > The following function produces a segv when the begin() is taken from > > vmap, the ScalarMap... > > int count = 0; > > std::map<Value*, DSNodeHandle>& vmap = theGraph->getScalarMap(); > > Are you sure "theGraph" is not null at this point? yes... that call returns sucessfully. the segfault occurs after... > > -Chris > > > for (std::map<Value*, DSNodeHandle>::iterator i = vmap.begin(); i > > != vmap.end(); ++i) { > > if(i-...
2002 Nov 28
0
[LLVMdev] Breakage in CVS?
> The following function produces a segv when the begin() is taken from > vmap, the ScalarMap... > int count = 0; > std::map<Value*, DSNodeHandle>& vmap = theGraph->getScalarMap(); Are you sure "theGraph" is not null at this point? -Chris > for (std::map<Value*, DSNodeHandle>::iterator i = vmap.begin(); i > != vmap.end(); ++i) { > if(i->second.getNode() == theNode) { > if(isa<MallocInst>(i->first)) count++; > } > }...
2002 Nov 28
0
[LLVMdev] Breakage in CVS?
> > > The following function produces a segv when the begin() is taken from > > > vmap, the ScalarMap... > > > int count = 0; > > > std::map<Value*, DSNodeHandle>& vmap = theGraph->getScalarMap(); > > > > Are you sure "theGraph" is not null at this point? > yes... that call returns sucessfully. the segfault occurs after... I don't doubt the call successfully returns. The call basically does some pointer arithmetic, adding a small constant to "theGraph&q...
2006 May 15
0
[LLVMdev] Re: __main() function and AliasSet
On Mon, 15 May 2006, Nai Xia wrote: > In other words, if I only use -steens-aa and the data_XXXs are all > external global variables( and so inComplete ), Sounds right! > the call to printf will > make the same effect, which I have tested it. > > Am I right ? :) If you've tested it then, yes you're right :). I haven't played with this stuff for a long time,
2006 May 15
2
[LLVMdev] Re: __main() function and AliasSet
Hi Chris, I took a haste look at the "Points-to Analysis in Almost Linear Time" by Steens , your PHD thesis and SteensGaard.cpp in LLVM this afternoon. So I think: 1. Actually the basic algorithm described originally by SteensGaard does not provide MOD/REF information for functions. 2. The context insensitive part of Data Structure Analysis (LocalAnalysis) can be deemed as an
2006 May 17
2
[LLVMdev] Re: __main() function and AliasSet
...r steens-aa, I think the logic for mod/ref is very clear: --------------------- AliasAnalysis::ModRefResult Steens::getModRefInfo(CallSite CS, Value *P, unsigned Size) { AliasAnalysis::ModRefResult Result = ModRef; // Find the node in question. DSGraph::ScalarMapTy &GSM = ResultGraph->getScalarMap(); DSGraph::ScalarMapTy::iterator I = GSM.find(P); if (I != GSM.end() && !I->second.isNull()) { DSNode *N = I->second.getNode(); if (N->isComplete()) { // If this is a direct call to an external function, and if the pointer // points to a complete node, the...