parent
041e2dbad1
commit
144694bcb7
|
@ -65,9 +65,6 @@ void llvm::DeleteDeadBlock(BasicBlock *BB) {
|
|||
/// when all entries to the PHI nodes in a block are guaranteed equal, such as
|
||||
/// when the block has exactly one predecessor.
|
||||
void llvm::FoldSingleEntryPHINodes(BasicBlock *BB) {
|
||||
if (!isa<PHINode>(BB->begin()))
|
||||
return;
|
||||
|
||||
while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
|
||||
if (PN->getIncomingValue(0) != PN)
|
||||
PN->replaceAllUsesWith(PN->getIncomingValue(0));
|
||||
|
|
Loading…
Reference in New Issue