diff options
author | Kang Zhang <shkzhang@cn.ibm.com> | 2019-07-26 03:25:58 +0000 |
---|---|---|
committer | Kang Zhang <shkzhang@cn.ibm.com> | 2019-07-26 03:25:58 +0000 |
commit | 4e794a8bae0077352f154f8902d43fe71f4e34cb (patch) | |
tree | 8faff5d2759f15d85bd5ac1fb6eb399a10ab7793 /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | a9ea8a9aae1f47eb9c68c1669aabd3908630518c (diff) | |
download | bcm5719-llvm-4e794a8bae0077352f154f8902d43fe71f4e34cb.tar.gz bcm5719-llvm-4e794a8bae0077352f154f8902d43fe71f4e34cb.zip |
Some case eror for: detected memory leaks
llvm-svn: 367083
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index a469f893ce1..639b588766a 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -2730,31 +2730,6 @@ void MachineBlockPlacement::optimizeBranches() { TII->removeBranch(*ChainBB); TII->insertBranch(*ChainBB, FBB, TBB, Cond, dl); ChainBB->updateTerminator(); - } else if (Cond.empty() && TBB && ChainBB != TBB && - !TBB->canFallThrough()) { - // When ChainBB is unconditional branch to the TBB, and TBB has no - // fallthrough predecessor and fallthrough successor, try to merge - // ChainBB and TBB. This is legal under the one of following conditions: - // 1. ChainBB is empty except for an unconditional branch. - // 2. TBB has only one predecessor. - MachineFunction::iterator I(TBB); - if (((TBB == &*F->begin()) || !std::prev(I)->canFallThrough()) && - (TailDup.isSimpleBB(ChainBB) || (TBB->pred_size() == 1))) { - TII->removeBranch(*ChainBB); - ChainBB->removeSuccessor(TBB); - - // Update the CFG. - for (MachineBasicBlock::pred_iterator PI = TBB->pred_begin(), - PE = TBB->pred_end(); PI != PE; PI++) - (*PI)->ReplaceUsesOfBlockWith(TBB, ChainBB); - - for (MachineBasicBlock *Succ : TBB->successors()) - ChainBB->addSuccessor(Succ, MBPI->getEdgeProbability(TBB, Succ)); - - // Move all the instructions of TBB to ChainBB. - ChainBB->splice(ChainBB->end(), TBB, TBB->begin(), TBB->end()); - F->remove(TBB); - } } } } |