[AMDGPU] Remove dead code.
authorDavide Italiano <davide@freebsd.org>
Tue, 19 Jul 2016 21:10:49 +0000 (21:10 +0000)
committerDavide Italiano <davide@freebsd.org>
Tue, 19 Jul 2016 21:10:49 +0000 (21:10 +0000)
LGTM'd by Matt Arsenault.

llvm-svn: 276029

llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp

index 91c66bb..d273b5b 100644 (file)
@@ -93,7 +93,6 @@ private:
                                      MachineBasicBlock::iterator I) const;
 
   std::pair<MachineBasicBlock *, MachineBasicBlock *>
-  splitBlock(MachineBasicBlock &MBB, MachineBasicBlock::iterator I);
 
 public:
   static char ID;
@@ -405,30 +404,6 @@ MachineBasicBlock *SILowerControlFlow::insertSkipBlock(
   return SkipBB;
 }
 
-std::pair<MachineBasicBlock *, MachineBasicBlock *>
-SILowerControlFlow::splitBlock(MachineBasicBlock &MBB,
-                               MachineBasicBlock::iterator I) {
-  MachineFunction *MF = MBB.getParent();
-
-  // To insert the loop we need to split the block. Move everything after this
-  // point to a new block, and insert a new empty block between the two.
-  MachineBasicBlock *LoopBB = MF->CreateMachineBasicBlock();
-  MachineBasicBlock *RemainderBB = MF->CreateMachineBasicBlock();
-  MachineFunction::iterator MBBI(MBB);
-  ++MBBI;
-
-  MF->insert(MBBI, LoopBB);
-  MF->insert(MBBI, RemainderBB);
-
-  // Move the rest of the block into a new block.
-  RemainderBB->transferSuccessors(&MBB);
-  RemainderBB->splice(RemainderBB->begin(), &MBB, I, MBB.end());
-
-  MBB.addSuccessor(LoopBB);
-
-  return std::make_pair(LoopBB, RemainderBB);
-}
-
 bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) {
   const SISubtarget &ST = MF.getSubtarget<SISubtarget>();
   TII = ST.getInstrInfo();