[llvm-commits] [llvm] r61358 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Owen Anderson
resistor at mac.com
Mon Dec 22 16:49:52 PST 2008
Author: resistor
Date: Mon Dec 22 18:49:51 2008
New Revision: 61358
URL: http://llvm.org/viewvc/llvm-project?rev=61358&view=rev
Log:
Don't forget to remove phi nodes from the value numbering table after we collapse them.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=61358&r1=61357&r2=61358&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Dec 22 18:49:51 2008
@@ -1313,6 +1313,8 @@
p->replaceAllUsesWith(constVal);
if (isa<PointerType>(constVal->getType()))
MD->invalidateCachedPointerInfo(constVal);
+ VN.erase(p);
+
toErase.push_back(p);
} else {
localAvail[I->getParent()]->table.insert(std::make_pair(num, I));
More information about the llvm-commits
mailing list