mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
improve naming of values in GVN, patch by Jay Foad!
llvm-svn: 64363
This commit is contained in:
parent
e5ec807aaf
commit
d093b49b81
@ -1035,7 +1035,7 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
|
||||
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 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user