[llvm-commits] CVS: llvm/lib/Transforms/IPO/PoolAllocate.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Feb 6 16:05:01 PST 2003
Changes in directory llvm/lib/Transforms/IPO:
PoolAllocate.cpp updated: 1.3 -> 1.4
---
Log message:
Fix a problem Sumant was running into
---
Diffs of the changes:
Index: llvm/lib/Transforms/IPO/PoolAllocate.cpp
diff -u llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.3 llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.4
--- llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.3 Mon Feb 3 13:08:18 2003
+++ llvm/lib/Transforms/IPO/PoolAllocate.cpp Thu Feb 6 16:03:46 2003
@@ -46,7 +46,7 @@
std::map<Function*, Function*> FuncMap;
// Loop over only the function initially in the program, don't traverse newly
- // added ones. If the function uses memory, make it's clone.
+ // added ones. If the function uses memory, make its clone.
Module::iterator LastOrigFunction = --M.end();
for (Module::iterator I = M.begin(); ; ++I) {
if (!I->isExternal())
@@ -132,7 +132,9 @@
Nodes[i]->markReachableNodes(MarkedNodes);
// Marked the returned node as alive...
- G.getRetNode().getNode()->markReachableNodes(MarkedNodes);
+ if (DSNode *RetNode = G.getRetNode().getNode())
+ if (RetNode->NodeType & DSNode::HeapNode)
+ RetNode->markReachableNodes(MarkedNodes);
if (MarkedNodes.empty()) // We don't need to clone the function if there
return 0; // are no incoming arguments to be added.
More information about the llvm-commits
mailing list