https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101720
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|rtl-optimization |middle-end Last reconfirmed| |2021-08-02 Ever confirmed|0 |1 --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- For the C++ testcase I see (-O2 -g): callgraph ipa passes : 32.87 ( 18%) 4.33 ( 30%) 37.20 ( 19%) 1103M ( 17%) template instantiation : 14.95 ( 8%) 2.60 ( 18%) 17.37 ( 9%) 1110M ( 17%) integration : 8.35 ( 5%) 1.47 ( 10%) 10.26 ( 5%) 854M ( 13%) variable tracking : 2.35 ( 1%) 0.02 ( 0%) 2.44 ( 1%) 98M ( 2%) var-tracking dataflow : 2.67 ( 1%) 0.02 ( 0%) 2.91 ( 1%) 1150k ( 0%) var-tracking emit : 3.24 ( 2%) 0.03 ( 0%) 3.03 ( 2%) 122M ( 2%) TOTAL : 184.28 14.25 198.55 6365M so it's a quite flat profile and dropping -g from -O2 -g changes it like: callgraph ipa passes : 27.96 ( 20%) 3.51 ( 31%) 31.48 ( 21%) 888M ( 21%) template instantiation : 14.53 ( 10%) 2.51 ( 22%) 17.01 ( 11%) 1105M ( 26%) integration : 4.91 ( 4%) 0.62 ( 6%) 5.55 ( 4%) 596M ( 14%) TOTAL : 140.12 11.26 151.39 4224M so there is probably some extra non-trivial overhead to debug stmts that would need to be profiled in more detail. ('integration' is inline instantiation) Adding -fno-var-tracking-assignments to -O2 -g reduced the compile-time to 155s.