[Bug ipa/88626] __builtin_constant_p should be as cheap as dead code for inlining purposes

2019-01-02 Thread hubicka at ucw dot cz
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

[Bug ipa/88626] __builtin_constant_p should be as cheap as dead code for inlining purposes

2019-01-02 Thread glisse at gcc dot gnu.org
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"

[Bug ipa/88626] __builtin_constant_p should be as cheap as dead code for inlining purposes

2019-01-02 Thread hubicka at gcc dot gnu.org
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

[Bug ipa/88626] __builtin_constant_p should be as cheap as dead code for inlining purposes

2019-01-02 Thread hubicka at gcc dot gnu.org
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

[Bug ipa/88626] __builtin_constant_p should be as cheap as dead code for inlining purposes

2019-01-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88626 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug ipa/88626] __builtin_constant_p should be as cheap as dead code for inlining purposes

2018-12-28 Thread glisse at gcc dot gnu.org
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