[Bug c++/85799] __builin_expect doesn't propagate through inlined functions
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 26 12:36:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85799
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|ASSIGNED |NEW
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Well, it would require partial stripping of selected predictors and then later
stripping all of them after profile_estimate pass.
About the __builtin_expect, I would recommend to use macro, similarly what
Linux does:
$ cat include/linux/compiler.h
...
#define likely_notrace(x) __builtin_expect(!!(x), 1)
#define unlikely_notrace(x) __builtin_expect(!!(x), 0)
...
Thus lowering priority for the PR.
More information about the Gcc-bugs
mailing list