https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109210

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Yep, I was thinking about this some time ago while reading the code.

At the time we run this we already identified BBs with count 0 and edges with
count 0. So I think when analyzing PHI we may want to see if any non-zero
incomming edge exists and if so look if all non-zero edges has same prediction
and if so combine it.  

If there is no non-zero edge in we can still combine same way the info over
zero edges.

There is also a paper on using VRP for branch prediction where value ranges are
histograms anotated by probabilities.

Reply via email to