mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
improve naming of values in GVN, patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64363 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
65c02fbf9b
commit
0aefc0eb2c
@ -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