[llvm-commits] [llvm] r64363 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Chris Lattner
sabre at nondot.org
Wed Feb 11 23:00:36 PST 2009
Author: lattner
Date: Thu Feb 12 01:00:35 2009
New Revision: 64363
URL: http://llvm.org/viewvc/llvm-project?rev=64363&view=rev
Log:
improve naming of values in GVN, patch by Jay Foad!
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=64363&r1=64362&r2=64363&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Thu Feb 12 01:00:35 2009
@@ -1035,7 +1035,7 @@
Value* v = GetValueForBlock(LI->getParent(), LI, BlockReplValues, true);
LI->replaceAllUsesWith(v);
- if (!isa<GlobalValue>(v))
+ if (isa<PHINode>(v))
v->takeName(LI);
if (isa<PointerType>(v->getType()))
MD->invalidateCachedPointerInfo(v);
@@ -1132,7 +1132,7 @@
// Perform PHI construction.
Value* v = GetValueForBlock(LI->getParent(), LI, BlockReplValues, true);
LI->replaceAllUsesWith(v);
- if (!isa<GlobalValue>(v))
+ if (isa<PHINode>(v))
v->takeName(LI);
if (isa<PointerType>(v->getType()))
MD->invalidateCachedPointerInfo(v);
More information about the llvm-commits
mailing list