Skip to content
Commit 7308f42d authored by Cong Hou's avatar Cong Hou
Browse files

[BranchProbability] Remove the restriction that known and unknown...

[BranchProbability] Remove the restriction that known and unknown probabilities cannot coexist when being normalized.

The current BranchProbability::normalizeProbabilities() forbids known and
unknown probabilities to coexist in the list. This was once used to help
capture probability exceptions but has caused some reported build
failures (https://llvm.org/bugs/show_bug.cgi?id=25838).

This patch removes this restriction by evenly distributing the complement
of the sum of all known probabilities to unknown ones. We could still
treat this as an abnormal behavior, but it is better to emit warnings in
our future profile validator.


Differential revision: http://reviews.llvm.org/D15548

llvm-svn: 255934
parent 8e9ba042
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment