mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
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:
parent
303fe16ea2
commit
c4822e0518
@ -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());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user