https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109491
--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> --- Just to make the point, for the testcase when compiling with -O -g I see > grep 'INLINE_ENTRY' t.ii.031t.einline | wc -l 16976 > grep 'INLINE_ENTRY' t.ii.034t.ccp1 | wc -l 15530 > grep 'INLINE_ENTRY' t.ii.043t.cddce1 | wc -l 14180 so there's some (not the majority) of inlined bodies removed by the first constant propagation pass and more at the end of the early optimization phase. It's a bit unreliable since not all inlines result in a INLINE_ENTRY debug stmt. It also shows this likely isn't the biggest issue. A factor of two compared to clang can be easily attributed to bigger IL representation as well. For me the testcase with -O2 builds in 17s with release checking enabled so that's not too bad (on a fast x86 machine). The most expensive pass is RTL PRE, accounting for 1/4 of the compile-time. With -O3 it's even faster. With -Dalways_inline=user the compile time reduces to 3s though.
