Hi,

An earlier patch (r203167) changed the default probability for
builtin_expect to 90%.
It does not work properly for the following case:
   while (__builin_expect (expr, 1)) { ....}

W/o builtin_expect, the exit probability is 9% while w/
builtin_expect, the exit probability is 10%.
It seems to be wrong as we should estimate this loop has more
iterations than w/o the annotation.

This attached patch bump the probability for this particular case.

Tested with bootstrap.

Thanks,

-Rong

Attachment: patch_diff
Description: Binary data

Reply via email to