diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-04-14 12:07:05 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-04-14 12:07:05 +0000 |
| commit | 0ae629bdd66d39eb36d7c2d1b4e10d4daa01c1a1 (patch) | |
| tree | b0775469f3a369ebdf2a1981cffb5538ace0e398 /contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp | |
| parent | a3d2e7b1ca42b6b1078c091d963437601b892f28 (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); } |
