diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-04-20 18:20:55 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-04-20 18:20:55 +0000 |
| commit | 0556cfadc2da2663e5cebc9f7d49684ecccdf4b3 (patch) | |
| tree | a8da74b9e1d6ddbcea28054e7384f532d6eba1bd /contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp | |
| parent | 042db8e8765507f0427c0d468e9d4f372bb2aa4c (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp')
| -rw-r--r-- | contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp b/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp index 209abf34d885..cd67449e3acf 100644 --- a/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -646,6 +646,14 @@ void MachineBasicBlock::replaceSuccessor(MachineBasicBlock *Old, removeSuccessor(OldI); } +void MachineBasicBlock::copySuccessor(MachineBasicBlock *Orig, + succ_iterator I) { + if (Orig->Probs.empty()) + addSuccessor(*I, Orig->getSuccProbability(I)); + else + addSuccessorWithoutProb(*I); +} + void MachineBasicBlock::addPredecessor(MachineBasicBlock *Pred) { Predecessors.push_back(Pred); } |
