Bug 20810: Use report_fatal_error instead of unreachable
llvm-svn: 262455
This commit is contained in:
parent
6b017a11ba
commit
5de68cbc4c
|
@ -923,7 +923,7 @@ bool AMDGPUCFGStructurizer::run() {
|
||||||
|
|
||||||
if (!Finish) {
|
if (!Finish) {
|
||||||
DEBUG(FuncRep->viewCFG());
|
DEBUG(FuncRep->viewCFG());
|
||||||
llvm_unreachable("IRREDUCIBLE_CFG");
|
report_fatal_error("IRREDUCIBLE_CFG");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1413,10 +1413,10 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
|
||||||
MachineBasicBlock::iterator I = insertInstrBefore(LandBlk, AMDGPU::ENDIF);
|
MachineBasicBlock::iterator I = insertInstrBefore(LandBlk, AMDGPU::ENDIF);
|
||||||
|
|
||||||
if (LandBlkHasOtherPred) {
|
if (LandBlkHasOtherPred) {
|
||||||
llvm_unreachable("Extra register needed to handle CFG");
|
report_fatal_error("Extra register needed to handle CFG");
|
||||||
unsigned CmpResReg =
|
unsigned CmpResReg =
|
||||||
HeadMBB->getParent()->getRegInfo().createVirtualRegister(I32RC);
|
HeadMBB->getParent()->getRegInfo().createVirtualRegister(I32RC);
|
||||||
llvm_unreachable("Extra compare instruction needed to handle CFG");
|
report_fatal_error("Extra compare instruction needed to handle CFG");
|
||||||
insertCondBranchBefore(LandBlk, I, AMDGPU::IF_PREDICATE_SET,
|
insertCondBranchBefore(LandBlk, I, AMDGPU::IF_PREDICATE_SET,
|
||||||
CmpResReg, DebugLoc());
|
CmpResReg, DebugLoc());
|
||||||
}
|
}
|
||||||
|
@ -1433,7 +1433,7 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
|
||||||
// need to uncondionally insert the assignment to ensure a path from its
|
// need to uncondionally insert the assignment to ensure a path from its
|
||||||
// predecessor rather than headBlk has valid value in initReg if
|
// predecessor rather than headBlk has valid value in initReg if
|
||||||
// (initVal != 1).
|
// (initVal != 1).
|
||||||
llvm_unreachable("Extra register needed to handle CFG");
|
report_fatal_error("Extra register needed to handle CFG");
|
||||||
}
|
}
|
||||||
insertInstrBefore(I, AMDGPU::ELSE);
|
insertInstrBefore(I, AMDGPU::ELSE);
|
||||||
|
|
||||||
|
@ -1442,7 +1442,7 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
|
||||||
// need to uncondionally insert the assignment to ensure a path from its
|
// need to uncondionally insert the assignment to ensure a path from its
|
||||||
// predecessor rather than headBlk has valid value in initReg if
|
// predecessor rather than headBlk has valid value in initReg if
|
||||||
// (initVal != 0)
|
// (initVal != 0)
|
||||||
llvm_unreachable("Extra register needed to handle CFG");
|
report_fatal_error("Extra register needed to handle CFG");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LandBlkHasOtherPred) {
|
if (LandBlkHasOtherPred) {
|
||||||
|
@ -1454,7 +1454,7 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
|
||||||
PE = LandBlk->pred_end(); PI != PE; ++PI) {
|
PE = LandBlk->pred_end(); PI != PE; ++PI) {
|
||||||
MachineBasicBlock *MBB = *PI;
|
MachineBasicBlock *MBB = *PI;
|
||||||
if (MBB != TrueMBB && MBB != FalseMBB)
|
if (MBB != TrueMBB && MBB != FalseMBB)
|
||||||
llvm_unreachable("Extra register needed to handle CFG");
|
report_fatal_error("Extra register needed to handle CFG");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEBUG(
|
DEBUG(
|
||||||
|
|
Loading…
Reference in New Issue