From 501246583062b301310878c4f53683b8dd4c595f Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 19 Jul 2016 21:10:49 +0000 Subject: [PATCH] [AMDGPU] Remove dead code. LGTM'd by Matt Arsenault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276029 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/SILowerControlFlow.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/lib/Target/AMDGPU/SILowerControlFlow.cpp b/lib/Target/AMDGPU/SILowerControlFlow.cpp index 91c66bb1558..d273b5b90ad 100644 --- a/lib/Target/AMDGPU/SILowerControlFlow.cpp +++ b/lib/Target/AMDGPU/SILowerControlFlow.cpp @@ -93,7 +93,6 @@ private: MachineBasicBlock::iterator I) const; std::pair - splitBlock(MachineBasicBlock &MBB, MachineBasicBlock::iterator I); public: static char ID; @@ -405,30 +404,6 @@ MachineBasicBlock *SILowerControlFlow::insertSkipBlock( return SkipBB; } -std::pair -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(); TII = ST.getInstrInfo(); -- 2.11.0