[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Feb 3 14:09:06 PST 2003
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.84 -> 1.85
---
Log message:
* Fix a bug introduced in the last checkin wrt Stack markers
* Make cloning more efficient in the process...
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.84 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.85
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.84 Mon Feb 3 13:12:15 2003
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Feb 3 14:08:51 2003
@@ -599,10 +599,15 @@
// Duplicate all of the nodes, populating the node map...
Nodes.reserve(FN+G.Nodes.size());
+
+ // Remove alloca or mod/ref bits as specified...
+ unsigned clearBits = (CloneFlags & StripAllocaBit ? DSNode::AllocaNode : 0)
+ | (CloneFlags & StripModRefBits ? (DSNode::Modified | DSNode::Read) : 0);
+ clearBits |= DSNode::DEAD; // Clear dead flag...
for (unsigned i = 0, e = G.Nodes.size(); i != e; ++i) {
DSNode *Old = G.Nodes[i];
DSNode *New = new DSNode(*Old);
- New->NodeType &= ~DSNode::DEAD; // Clear dead flag...
+ New->NodeType &= ~clearBits;
Nodes.push_back(New);
OldNodeMap[Old] = New;
}
@@ -614,13 +619,6 @@
// Rewrite the links in the new nodes to point into the current graph now.
for (unsigned i = FN, e = Nodes.size(); i != e; ++i)
Nodes[i]->remapLinks(OldNodeMap);
-
- // Remove alloca markers as specified
- if (CloneFlags & (StripAllocaBit | StripModRefBits)) {
- unsigned clearBits = (CloneFlags & StripAllocaBit ? DSNode::AllocaNode : 0)
- | (CloneFlags & StripModRefBits ? (DSNode::Modified | DSNode::Read) : 0);
- maskNodeTypes(~clearBits);
- }
// Copy the scalar map... merging all of the global nodes...
for (hash_map<Value*, DSNodeHandle>::const_iterator I = G.ScalarMap.begin(),
More information about the llvm-commits
mailing list