[llvm-commits] [poolalloc] r56966 - /poolalloc/trunk/lib/DSA/StdLibPass.cpp
John Criswell
criswell at uiuc.edu
Thu Oct 2 13:18:42 PDT 2008
Author: criswell
Date: Thu Oct 2 15:18:39 2008
New Revision: 56966
URL: http://llvm.org/viewvc/llvm-project?rev=56966&view=rev
Log:
Added more code to handle cases where the DSNode may be NULL for a function
pointer argument. This can happen if the argument is a constant NULL
pointer.
Modified:
poolalloc/trunk/lib/DSA/StdLibPass.cpp
Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=56966&r1=56965&r2=56966&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original)
+++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Thu Oct 2 15:18:39 2008
@@ -127,7 +127,8 @@
if (recFuncs[x].action.args_read)
for (unsigned y = 1; y < CI->getNumOperands(); ++y)
if (isa<PointerType>(CI->getOperand(y)->getType()))
- Graph.getNodeForValue(CI->getOperand(y)).getNode()->setReadMarker();
+ if (DSNode * Node=Graph.getNodeForValue(CI->getOperand(y)).getNode())
+ Node->setReadMarker();
if (recFuncs[x].action.args_write)
for (unsigned y = 1; y < CI->getNumOperands(); ++y)
if (isa<PointerType>(CI->getOperand(y)->getType()))
@@ -136,7 +137,8 @@
if (recFuncs[x].action.args_heap)
for (unsigned y = 1; y < CI->getNumOperands(); ++y)
if (isa<PointerType>(CI->getOperand(y)->getType()))
- Graph.getNodeForValue(CI->getOperand(y)).getNode()->setHeapMarker();
+ if (DSNode * Node=Graph.getNodeForValue(CI->getOperand(y)).getNode())
+ Node->setHeapMarker();
std::vector<DSNodeHandle> toMerge;
if (recFuncs[x].action.mergeWithRet)
@@ -152,7 +154,8 @@
Graph.getNodeForValue(CI).getNode()->foldNodeCompletely();
for (unsigned y = 1; y < CI->getNumOperands(); ++y)
if (isa<PointerType>(CI->getOperand(y)->getType()))
- Graph.getNodeForValue(CI->getOperand(y)).getNode()->foldNodeCompletely();
+ if (DSNode * Node=Graph.getNodeForValue(CI->getOperand(y)).getNode())
+ Node->foldNodeCompletely();
}
//delete the call
More information about the llvm-commits
mailing list