[llvm] r242410 - AMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError()
Daniel Sanders
Daniel.Sanders at imgtec.com
Fri Jul 17 03:25:09 PDT 2015
Hans: This fixes the test I had to kill on the 3.7 branch. Ok to merge it (and the follow-on r242412) to 3.7?
> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Tom Stellard
> Sent: 16 July 2015 16:38
> To: llvm-commits at cs.uiuc.edu
> Subject: [llvm] r242410 - AMDPGU/R600: Replace llvm_unreachable() call
> with LLVMContext::emitError()
>
> Author: tstellar
> Date: Thu Jul 16 10:38:29 2015
> New Revision: 242410
>
> URL: http://llvm.org/viewvc/llvm-project?rev=242410&view=rev
> Log:
> AMDPGU/R600: Replace llvm_unreachable() call with
> LLVMContext::emitError()
>
> Summary:
> This fixes an issue on MIPS where the infinite-loop-evergreen.ll test
> was failing to terminate.
>
> Fixes PR24147.
>
> Reviewers: arsenm, dsanders
>
> Subscribers: llvm-commits
>
> Differential Revision: http://reviews.llvm.org/D11260
>
> Modified:
> llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
>
> Modified: llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp?rev=242
> 410&r1=242409&r2=242410&view=diff
> ==========================================================
> ====================
> --- llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp (original)
> +++ llvm/trunk/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp Thu Jul 16
> 10:38:29 2015
> @@ -1732,18 +1732,9 @@ AMDGPUCFGStructurizer::normalizeInfinite
> 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) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list