[PATCH] D11260: AMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError()
Phabricator
reviews at reviews.llvm.org
Thu Jul 16 08:38:46 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL242410: AMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError() (authored by tstellar).
Changed prior to commit:
http://reviews.llvm.org/D11260?vs=29899&id=29916#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11260
Files:
llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
Index: llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
@@ -1732,18 +1732,9 @@
FuncRep->push_back(DummyExitBlk); //insert to function
SHOWNEWBLK(DummyExitBlk, "DummyExitBlock to normalize infiniteLoop: ");
DEBUG(dbgs() << "Old branch instr: " << *BranchMI << "\n";);
- MachineBasicBlock::iterator I = BranchMI;
- unsigned ImmReg = FuncRep->getRegInfo().createVirtualRegister(I32RC);
- llvm_unreachable("Extra register needed to handle CFG");
- MachineInstr *NewMI = insertInstrBefore(I, AMDGPU::BRANCH_COND_i32);
- MachineInstrBuilder MIB(*FuncRep, NewMI);
- MIB.addMBB(LoopHeader);
- MIB.addReg(ImmReg, false);
- SHOWNEWINSTR(NewMI);
- BranchMI->eraseFromParent();
- LoopLatch->addSuccessor(DummyExitBlk);
-
- return DummyExitBlk;
+ LLVMContext &Ctx = LoopHeader->getParent()->getFunction()->getContext();
+ Ctx.emitError("Extra register needed to handle CFG");
+ return nullptr;
}
void AMDGPUCFGStructurizer::removeUnconditionalBranch(MachineBasicBlock *MBB) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11260.29916.patch
Type: text/x-patch
Size: 1180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150716/94e202d6/attachment.bin>
More information about the llvm-commits
mailing list