diff options
| author | Cong Hou <congh@google.com> | 2015-12-13 09:26:17 +0000 |
|---|---|---|
| committer | Cong Hou <congh@google.com> | 2015-12-13 09:26:17 +0000 |
| commit | c106989fd5ca0f39f5e88d06a90a1227d037d43e (patch) | |
| tree | 9016259591672095defee02eef1659101612454a /llvm/lib/CodeGen/SelectionDAG | |
| parent | 7f8b43d42478a2d8140f2949314dcfa34071ac28 (diff) | |
| download | bcm5719-llvm-c106989fd5ca0f39f5e88d06a90a1227d037d43e.tar.gz bcm5719-llvm-c106989fd5ca0f39f5e88d06a90a1227d037d43e.zip | |
Normalize MBB's successors' probabilities in several locations.
This patch adds some missing calls to MBB::normalizeSuccProbs() in several
locations where it should be called. Those places are found by checking if the
sum of successors' probabilities is approximate one in MachineBlockPlacement
pass with some instrumented code (not in this patch).
Differential revision: http://reviews.llvm.org/D15259
llvm-svn: 255455
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 77b52c0f2e3..3b09f258952 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2270,6 +2270,7 @@ void SelectionDAGBuilder::visitIndirectBr(const IndirectBrInst &I) { MachineBasicBlock *Succ = FuncInfo.MBBMap[BB]; addSuccessorWithProb(IndirectBrMBB, Succ); } + IndirectBrMBB->normalizeSuccProbs(); DAG.setRoot(DAG.getNode(ISD::BRIND, getCurSDLoc(), MVT::Other, getControlRoot(), |

