OSDN Git Service

[CodeGen] fix broken successor probability in MBB dump
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Fri, 28 Sep 2018 05:27:32 +0000 (05:27 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Fri, 28 Sep 2018 05:27:32 +0000 (05:27 +0000)
commitea3df5ebac03ece8b839431bded5e5499e4d6210
treeed24386188b0b1af241d4b7b441890055ce5fe1b
parent5cdff6b4844e8aa8d264722d5f98aa2d28d1a1a0
[CodeGen] fix broken successor probability in MBB dump

When printing successor probabilities for a MBB, a human readable value is sometimes shown as 200.0%.
The human readable output is based on getProbabilityIterator, which returns 0xFFFFFFFF for getNumerator() and 0x80000000 for getDenominator() for unknown BranchProbability.
By using getSuccProbability as we do for the non-human readable part, we can avoid this problem.

Differential Revision: https://reviews.llvm.org/D52605

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343297 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBasicBlock.cpp
test/Other/X86/mbb-dump.ll [new file with mode: 0644]