[Bug tree-optimization/103989] [12 regression] std::optional and bogus -Wmaybe-unitialized at -Og since r12-1992-g6feb628a706e86eb
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 13 13:58:58 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103989
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to hubicka from comment #12)
> > Yeah, and since we inline all always inline and also flatten during
> > early inline the IPA inliner should really do nothing.
>
> OK, can_inline_edge_p will do that but we will still walk the calls
> which is bit of wasted effort. Will look into that incrementally.
> >
> > > It may be nice to also avoid re-analyzing functions completely to save
> > > some compile time, but that may be bit tricky if we decide to do things
> > > like cross-module always_inline. I will look into that too, but perhaps
> > > that can wait for next stage1.
> >
> > I think we decided to have all always inline early and drop bodies now,
> > didn't you patch it that way this stage1?
> I think that gets into trouble i.e. with kernel calling always_inlines
> indirectly. It is a mess...
Sure - I just remember (falsely?) that we finally decided to do it :)
If we don't run IPA inline we don't figure we failed to inline the
always_inline either ;) And IPA inline can expose more indirect
alywas-inlines we only discover after even more optimization so the
issue is really moot unless we sorry () (or link-fail).
> >
> > IIRC the CCP was necessary for some odd reason I don't remember
> > right now ;)
>
> I would bet it was builtin_constat_p and inlining, so perhaps if we
> completely ban late inlining ccp can go.
Yeah, or __builtin_unreachable, or whatever ;)
> >
> > > Looking into what passes are in the pipeline I also noticed that
> > > we could also probably skip late modref from -Og optimization pipeline.
> >
> > Yes, I noticed it was there just now ...
>
> I will make patch to drop it for trunk. If we disable all optimization
> the repeated pure-const seems pointless as well?
Yes.
More information about the Gcc-bugs
mailing list