https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103989
--- Comment #12 from hubicka at kam dot mff.cuni.cz --- > 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... > > 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. > > > 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?