summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/PoolAllocate.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-19 21:15:26 +0000
committerChris Lattner <sabre@nondot.org>2003-06-19 21:15:26 +0000
commitd01460495efc5b5bb8cc3a2cce76ed454245460f (patch)
tree824d475ccb568bd5ec82a574f3e7fec6c56f35d4 /llvm/lib/Transforms/IPO/PoolAllocate.cpp
parent4853d162af91f264c811884985f77513e204700f (diff)
downloadbcm5719-llvm-d01460495efc5b5bb8cc3a2cce76ed454245460f.tar.gz
bcm5719-llvm-d01460495efc5b5bb8cc3a2cce76ed454245460f.zip
Changes to privatize NodeType
llvm-svn: 6795
Diffstat (limited to 'llvm/lib/Transforms/IPO/PoolAllocate.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/PoolAllocate.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/IPO/PoolAllocate.cpp b/llvm/lib/Transforms/IPO/PoolAllocate.cpp
index facfcbec8b8..e4880a5d927 100644
--- a/llvm/lib/Transforms/IPO/PoolAllocate.cpp
+++ b/llvm/lib/Transforms/IPO/PoolAllocate.cpp
@@ -82,9 +82,9 @@ void PoolAllocate::buildIndirectFunctionSets(Module &M) {
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 @@ void PoolAllocate::FindFunctionPoolArgs(Function &F) {
// 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 @@ void PoolAllocate::ProcessFunctionBody(Function &F, Function &NewF) {
// 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]);
OpenPOWER on IntegriCloud