[PATCH] Fix information loss in branch probability computation.
Diego Novillo
dnovillo at google.com
Wed May 6 16:00:30 PDT 2015
This modifies the scaling to do it based on the sum of all branch weights. If
the sum of weights exceeds 32 bits, compute an integer scale to bring all the
weights within the range.
Additionally, remove the use of scaled integers. Use 64 bit integers for
all the calculations.
Adjust tests and an assertion in switch lowering. The assertion was
using the previous branch weight limits.
http://reviews.llvm.org/D9442
Files:
lib/Analysis/BranchProbabilityInfo.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/Analysis/BranchProbabilityInfo/pr22718.ll
test/CodeGen/X86/MachineBranchProb.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9442.25103.patch
Type: text/x-patch
Size: 8239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150506/c1a276ad/attachment.bin>
More information about the llvm-commits
mailing list