diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 18:34:38 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-09-06 18:34:38 +0000 | 
| commit | 69156b4c20249e7800cc09e0eef0beb3d15ac1ad (patch) | |
| tree | 461d3cf041290f4a99740d540bf0973d6084f98e /lib/Target/AMDGPU/AMDILCFGStructurizer.cpp | |
| parent | ee8648bdac07986a0f1ec897b02ec82a2f144d46 (diff) | |
Notes
Diffstat (limited to 'lib/Target/AMDGPU/AMDILCFGStructurizer.cpp')
| -rw-r--r-- | lib/Target/AMDGPU/AMDILCFGStructurizer.cpp | 16 | 
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp b/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp index c9b25a1a0b84..d918ac3a5b3b 100644 --- a/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp +++ b/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp @@ -1719,7 +1719,6 @@ MachineBasicBlock *  AMDGPUCFGStructurizer::normalizeInfiniteLoopExit(MachineLoop* LoopRep) {    MachineBasicBlock *LoopHeader = LoopRep->getHeader();    MachineBasicBlock *LoopLatch = LoopRep->getLoopLatch(); -  const TargetRegisterClass * I32RC = TRI->getCFGStructurizerRegClass(MVT::i32);    if (!LoopHeader || !LoopLatch)      return nullptr; @@ -1732,18 +1731,9 @@ AMDGPUCFGStructurizer::normalizeInfiniteLoopExit(MachineLoop* LoopRep) {    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) {  | 
