There is no need to clone over nodes that are going to be dead anyway

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11157 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-02-07 22:00:03 +00:00
parent 5616dc9ea6
commit a5ca28cafe

View File

@ -1112,9 +1112,11 @@ void DSGraph::cloneInto(const DSGraph &G, DSScalarMap &OldValMap,
BitsToClear |= DSNode::DEAD; // Clear dead flag... BitsToClear |= DSNode::DEAD; // Clear dead flag...
for (unsigned i = 0, e = G.Nodes.size(); i != e; ++i) { for (unsigned i = 0, e = G.Nodes.size(); i != e; ++i) {
DSNode *Old = G.Nodes[i]; DSNode *Old = G.Nodes[i];
DSNode *New = new DSNode(*Old, this); if (!Old->isForwarding()) {
New->maskNodeTypes(~BitsToClear); DSNode *New = new DSNode(*Old, this);
OldNodeMap[Old] = New; New->maskNodeTypes(~BitsToClear);
OldNodeMap[Old] = New;
}
} }
#ifndef NDEBUG #ifndef NDEBUG
Timer::addPeakMemoryMeasurement(); Timer::addPeakMemoryMeasurement();