[Bug tree-optimization/103989] [12 regression] std::optional and bogus -Wmaybe-unitialized at -Og since r12-1992-g6feb628a706e86eb
hubicka at kam dot mff.cuni.cz
gcc-bugzilla@gcc.gnu.org
Thu Jan 13 11:56:21 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103989
--- Comment #7 from hubicka at kam dot mff.cuni.cz ---
> --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
> Honza, -Og was supposed to not do so much work, I intended to disable IPA
> inlining but there's no knob for that. I wonder where to best put such
> guard? I set flag_inline_small_functions to zero for -Og but we still
> run inline_small_functions (). Basically -Og was supposed to only do
> early opts and then what is necessary for correct RTL expansion. Doing
> IPA inlining defeats this :/
>
> Can you help? Is it safe to simply gate the inline_small_functions ()
> call? Do we want an extra -f[no-]ipa-inline like we have -fearly-inlining?
>
> Using -fdisable-ipa-inline gets rid of the diagnostic
You can not disable an IPA pass becasuse then we will mishandle
optimize attributes. I think you simply want to set
flag_inline_small_functions = 0
flag_inline_functions_called_once = 0
and we should only inline always_inlines. inline_small_functions will
still loop and check inlinability of functions but if everything is
compiled with -Og it will not find anything inlinable and exit.
Perhaps we may also extend initialize_inline_failed to add
CIF_DEBUG_OPTIMIZE so -Winline does say something more useufl then
"function not considered"
Honza
More information about the Gcc-bugs
mailing list