diff --git a/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp b/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp index f2ca118cd475..660466d0d6c2 100644 --- a/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp +++ b/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp @@ -208,7 +208,6 @@ namespace { void removeBlock(MachineBasicBlock *B); void eliminatePhis(MachineBasicBlock *B); - void replacePhiEdges(MachineBasicBlock *OldB, MachineBasicBlock *NewB); void mergeBlocks(MachineBasicBlock *PredB, MachineBasicBlock *SuccB); void simplifyFlowGraph(const FlowPattern &FP); @@ -1006,20 +1005,6 @@ void HexagonEarlyIfConversion::eliminatePhis(MachineBasicBlock *B) { } } -void HexagonEarlyIfConversion::replacePhiEdges(MachineBasicBlock *OldB, - MachineBasicBlock *NewB) { - for (auto I = OldB->succ_begin(), E = OldB->succ_end(); I != E; ++I) { - MachineBasicBlock *SB = *I; - MachineBasicBlock::iterator P, N = SB->getFirstNonPHI(); - for (P = SB->begin(); P != N; ++P) { - MachineInstr &PN = *P; - for (MachineOperand &MO : PN.operands()) - if (MO.isMBB() && MO.getMBB() == OldB) - MO.setMBB(NewB); - } - } -} - void HexagonEarlyIfConversion::mergeBlocks(MachineBasicBlock *PredB, MachineBasicBlock *SuccB) { DEBUG(dbgs() << "Merging blocks " << PrintMB(PredB) << " and "