mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-13 11:30:21 +00:00
Avoid a redundant call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
77d76b7ef7
commit
cb29a4f66a
@ -808,10 +808,10 @@ Value *GVN::GetValueForBlock(BasicBlock *BB, LoadInst* orig,
|
|||||||
DenseMap<BasicBlock*, Value*>::iterator V = Phis.find(BB);
|
DenseMap<BasicBlock*, Value*>::iterator V = Phis.find(BB);
|
||||||
if (V != Phis.end() && !top_level) return V->second;
|
if (V != Phis.end() && !top_level) return V->second;
|
||||||
|
|
||||||
if (!getAnalysis<DominatorTree>().isReachableFromEntry(BB)) {
|
// If the block is unreachable, just return undef, since this path
|
||||||
Phis[BB] = UndefValue::get(orig->getType());
|
// can't actually occur at runtime.
|
||||||
return UndefValue::get(orig->getType());
|
if (!getAnalysis<DominatorTree>().isReachableFromEntry(BB))
|
||||||
}
|
return Phis[BB] = UndefValue::get(orig->getType());
|
||||||
|
|
||||||
BasicBlock* singlePred = BB->getSinglePredecessor();
|
BasicBlock* singlePred = BB->getSinglePredecessor();
|
||||||
if (singlePred) {
|
if (singlePred) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user