[llvm-commits] CVS: llvm/lib/Transforms/IPO/PoolAllocate.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jun 19 16:16:06 PDT 2003
Changes in directory llvm/lib/Transforms/IPO:
PoolAllocate.cpp updated: 1.8 -> 1.9
---
Log message:
Changes to privatize NodeType
---
Diffs of the changes:
Index: llvm/lib/Transforms/IPO/PoolAllocate.cpp
diff -u llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.8 llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.9
--- llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.8 Sat Jun 7 15:29:58 2003
+++ llvm/lib/Transforms/IPO/PoolAllocate.cpp Thu Jun 19 16:15:26 2003
@@ -82,9 +82,9 @@
CSE = callSites.end(); CSI != CSE ; ++CSI) {
if (CSI->isIndirectCall()) {
DSNode *DSN = CSI->getCalleeNode();
- if (DSN->NodeType == DSNode::Incomplete)
+ if (DSN->isIncomplete())
std::cerr << "Incomplete node " << CSI->getCallInst();
- // assert(DSN->NodeType == DSNode::GlobalNode);
+ // assert(DSN->isGlobalNode());
std::vector<GlobalValue*> &Callees = DSN->getGlobals();
if (Callees.size() > 0) {
Function *firstCalledF = dyn_cast<Function>(*Callees.begin());
@@ -229,13 +229,13 @@
// Mark globals and incomplete nodes as live... (this handles arguments)
if (F.getName() != "main")
for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
- if (Nodes[i]->NodeType & (DSNode::GlobalNode | DSNode::Incomplete) &&
- Nodes[i]->NodeType & (DSNode::HeapNode))
+ if ((Nodes[i]->isGlobalNode() || Nodes[i]->isIncomplete()) &&
+ Nodes[i]->isHeapNode())
Nodes[i]->markReachableNodes(MarkedNodes);
// Marked the returned node as alive...
if (DSNode *RetNode = G.getRetNode().getNode())
- if (RetNode->NodeType & DSNode::HeapNode)
+ if (RetNode->isHeapNode())
RetNode->markReachableNodes(MarkedNodes);
if (MarkedNodes.empty()) // We don't need to clone the function if there
@@ -411,7 +411,7 @@
// ones to the NodesToPA vector.
std::vector<DSNode*> NodesToPA;
for (unsigned i = 0, e = Nodes.size(); i != e; ++i)
- if (Nodes[i]->NodeType & DSNode::HeapNode && // Pick nodes with heap elems
+ if (Nodes[i]->isHeapNode() && // Pick nodes with heap elems
!MarkedNodes.count(Nodes[i])) // Can't be marked
NodesToPA.push_back(Nodes[i]);
More information about the llvm-commits
mailing list