mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
When asked not to delete useless PHIs, really don't delete them, no matter how
redundant they are. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
13a68e4257
commit
90245d4cbb
@ -213,7 +213,8 @@ void BasicBlock::removePredecessor(BasicBlock *Pred,
|
||||
PN->removeIncomingValue(Pred, false);
|
||||
// If all incoming values to the Phi are the same, we can replace the Phi
|
||||
// with that value.
|
||||
if (Value *PNV = PN->hasConstantValue()) {
|
||||
Value* PNV = 0;
|
||||
if (!DontDeleteUselessPHIs && (PNV = PN->hasConstantValue())) {
|
||||
PN->replaceAllUsesWith(PNV);
|
||||
PN->eraseFromParent();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user