https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626
--- Comment #6 from Jan Hubicka ---
> Maybe a heuristic that gives a "bonus" for inlining a function that contains
> __builtin_constant_p (only if the argument looks like it depends on the
> function parameters?) would be easier? I don't know if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626
--- Comment #5 from Marc Glisse ---
(In reply to Richard Biener from comment #2)
> The __builtin_constant_p call itself is "free" but whether guarded code is
> "free" isn't easy to determine. I guess what you want is the computation
> of "b"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626
--- Comment #4 from Jan Hubicka ---
Also note that builtin_constant_p is handled conservatively.
If you have
if (builtin_constant_p (x))
constant code;
else
nonconstant code;
inliner will know that nonconstant code will be optimized out if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626
Jan Hubicka changed:
What|Removed |Added
CC||hubicka at gcc dot gnu.org
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626
--- Comment #1 from Marc Glisse ---
In my application (quite a bit bigger than the testcase...), looking at the
optimized dump, I see that the function is inlined without the
__builtin_constant_p code, but when I add the __builtin_constant_p