diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-07 22:00:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-07 22:00:03 +0000 |
commit | a5ca28cafe01a17cf46088d6ab641fc491482897 (patch) | |
tree | 6d5ea376cc3afe96266cd1164b6d1ec86307c7fb /lib | |
parent | 5616dc9ea64d8fcc7f366f6c11b050817d7ec227 (diff) | |
download | external_llvm-a5ca28cafe01a17cf46088d6ab641fc491482897.zip external_llvm-a5ca28cafe01a17cf46088d6ab641fc491482897.tar.gz external_llvm-a5ca28cafe01a17cf46088d6ab641fc491482897.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 470899e..5050515 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -1112,9 +1112,11 @@ void DSGraph::cloneInto(const DSGraph &G, DSScalarMap &OldValMap, 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(); |