[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Feb 7 16:01:01 PST 2004
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.148 -> 1.149
---
Log message:
There is no need to clone over nodes that are going to be dead anyway
---
Diffs of the changes: (+5 -3)
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.148 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.149
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.148 Thu Jan 29 02:36:22 2004
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sat Feb 7 16:00:03 2004
@@ -1112,9 +1112,11 @@
BitsToClear |= 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, this);
- New->maskNodeTypes(~BitsToClear);
- OldNodeMap[Old] = New;
+ if (!Old->isForwarding()) {
+ DSNode *New = new DSNode(*Old, this);
+ New->maskNodeTypes(~BitsToClear);
+ OldNodeMap[Old] = New;
+ }
}
#ifndef NDEBUG
Timer::addPeakMemoryMeasurement();
More information about the llvm-commits
mailing list