forked from OSchip/llvm-project
Simplify now that blocks with phis are not considered simple.
llvm-svn: 133793
This commit is contained in:
parent
cff9c5e9a0
commit
ad0cdd5606
|
@ -659,21 +659,6 @@ TailDuplicatePass::duplicateSimpleBB(MachineBasicBlock *TailBB,
|
|||
MachineBasicBlock *NewTarget = *TailBB->succ_begin();
|
||||
MachineBasicBlock *NextBB = llvm::next(MachineFunction::iterator(PredBB));
|
||||
|
||||
DenseMap<unsigned, unsigned> LocalVRMap;
|
||||
SmallVector<std::pair<unsigned,unsigned>, 4> CopyInfos;
|
||||
for (MachineBasicBlock::iterator I = TailBB->begin();
|
||||
I != TailBB->end() && I->isPHI();) {
|
||||
MachineInstr *MI = &*I;
|
||||
++I;
|
||||
ProcessPHI(MI, TailBB, PredBB, LocalVRMap, CopyInfos, UsedByPhi, true);
|
||||
}
|
||||
MachineBasicBlock::iterator Loc = PredBB->getFirstTerminator();
|
||||
for (unsigned i = 0, e = CopyInfos.size(); i != e; ++i) {
|
||||
Copies.push_back(BuildMI(*PredBB, Loc, DebugLoc(),
|
||||
TII->get(TargetOpcode::COPY),
|
||||
CopyInfos[i].first).addReg(CopyInfos[i].second));
|
||||
}
|
||||
|
||||
// Make PredFBB explicit.
|
||||
if (PredCond.empty())
|
||||
PredFBB = PredTBB;
|
||||
|
|
Loading…
Reference in New Issue