forked from OSchip/llvm-project
[SimplifyCFG] Common debug handling [NFC]
llvm-svn: 340997
This commit is contained in:
parent
7481540fd9
commit
7c57dac955
|
@ -2688,8 +2688,6 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, unsigned BonusInstThreshold) {
|
|||
// all instructions before Cond other than DbgInfoIntrinsic are bonus
|
||||
// instructions.
|
||||
for (auto BonusInst = BB->begin(); Cond != &*BonusInst; ++BonusInst) {
|
||||
if (isa<DbgInfoIntrinsic>(BonusInst))
|
||||
continue;
|
||||
Instruction *NewBonusInst = BonusInst->clone();
|
||||
RemapInstruction(NewBonusInst, VMap,
|
||||
RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
|
||||
|
@ -2816,12 +2814,6 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, unsigned BonusInstThreshold) {
|
|||
|
||||
// TODO: If BB is reachable from all paths through PredBlock, then we
|
||||
// could replace PBI's branch probabilities with BI's.
|
||||
|
||||
// Copy any debug value intrinsics into the end of PredBlock.
|
||||
for (Instruction &I : *BB)
|
||||
if (isa<DbgInfoIntrinsic>(I))
|
||||
I.clone()->insertBefore(PBI);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue