[Bug c++/85799] __builin_expect doesn't propagate through inlined functions
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 16 07:30:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85799
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-05-16
CC| |hubicka at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I believe inlining is happening too late for it to have an effect - we are
early inlining a body which has the __builtin_expect replaced by nothing.
Iff the expected outcome is "constant" a new function attribute would work.
For outcome dependent on context that wouldn't work.
Not sure if we can simply introduce a return-value predictor that survives
inlining? Honza?
More information about the Gcc-bugs
mailing list