https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109509
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Chip, can you specify which code it is? LLVM only does always_inlines we handle during early optimization. Many of cases where people run into inline bombs are with LTO where the inlining happens cross-module. One option would be to ignore them at WPA I did some work on chasing out non-linearities two years ago while enabling auto-inlining at -O2. Plan to return to it this stage1. Just checking the situation with basic inline bomb: #include <stdio.h> static inline __attribute__ ((always_inline)) void test1() { printf ("ok\n"); } #define D(i,j) static inline __attribute__ ((always_inline)) void test##j() { test##i(); test##i(); } D(1,2) D(2,3) D(3,4) D(4,5) D(5,6) D(6,7) D(7,8) D(8,9) D(9,10) D(10,11) D(11,12) D(12,13) D(13,14) D(14,15) D(15,16) D(16,17) D(17,18) D(18,19) int main() { test19(); return 0; } GCC 13.0 compiles it in 126s with about 1GB of RAM. clang needs 12s. Time report claims half of it is ipa passes: callgraph ipa passes : 56.68 ( 45%) 1.08 ( 50%) 57.77 ( 45%) 1026M ( 81%) But it is because early optimization is IPA pass an in fact we spent most of time in IPA: tree PTA : 97.49 ( 77%) 0.57 ( 26%) 98.10 ( 76%) 80M ( 6%) Which is also run as part of early passes. Integratoin is 2.2s