R600: Remove some dead code from the AMDILCFGStructurizer

Reviewed-by: Vincent Lejeune<vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192812 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard 2013-10-16 17:05:56 +00:00
parent 303fe16ea2
commit c4822e0518

View File

@ -1335,32 +1335,11 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
// add initReg = initVal to headBlk
const TargetRegisterClass * I32RC = TRI->getCFGStructurizerRegClass(MVT::i32);
unsigned InitReg =
HeadMBB->getParent()->getRegInfo().createVirtualRegister(I32RC);
if (!MigrateTrue || !MigrateFalse)
llvm_unreachable("Extra register needed to handle CFG");
int NumNewBlk = 0;
if (!LandBlk) {
LandBlk = HeadMBB->getParent()->CreateMachineBasicBlock();
HeadMBB->getParent()->push_back(LandBlk); //insert to function
if (TrueMBB) {
TrueMBB->addSuccessor(LandBlk);
} else {
HeadMBB->addSuccessor(LandBlk);
}
if (FalseMBB) {
FalseMBB->addSuccessor(LandBlk);
} else {
HeadMBB->addSuccessor(LandBlk);
}
NumNewBlk ++;
}
bool LandBlkHasOtherPred = (LandBlk->pred_size() > 2);
//insert AMDGPU::ENDIF to avoid special case "input landBlk == NULL"
@ -1375,6 +1354,10 @@ int AMDGPUCFGStructurizer::improveSimpleJumpintoIf(MachineBasicBlock *HeadMBB,
CmpResReg, DebugLoc());
}
// XXX: We are running this after RA, so creating virtual registers will
// cause an assertion failure in the PostRA scheduling pass.
unsigned InitReg =
HeadMBB->getParent()->getRegInfo().createVirtualRegister(I32RC);
insertCondBranchBefore(LandBlk, I, AMDGPU::IF_PREDICATE_SET, InitReg,
DebugLoc());