https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119516
Sam James <sjames at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |compile-time-hog --- Comment #1 from Sam James <sjames at gcc dot gnu.org> --- At -O1 with checking: ``` $ g++ a.cxx -std=c++26 -O1 -ftime-report Time variable wall GGC phase setup : 0.00 ( 0%) 1813k ( 1%) phase parsing : 0.96 ( 25%) 134M ( 58%) phase lang. deferred : 0.42 ( 11%) 33M ( 15%) phase opt and generate : 2.45 ( 64%) 61M ( 27%) |name lookup : 0.15 ( 4%) 4534k ( 2%) |overload resolution : 0.37 ( 10%) 37M ( 16%) garbage collection : 0.31 ( 8%) 0 ( 0%) callgraph construction : 0.03 ( 1%) 2445k ( 1%) callgraph optimization : 0.02 ( 0%) 12k ( 0%) callgraph functions expansion : 1.83 ( 48%) 33M ( 14%) callgraph ipa passes : 0.54 ( 14%) 20M ( 9%) ipa function summary : 0.02 ( 0%) 759k ( 0%) ipa inlining heuristics : 0.01 ( 0%) 1013k ( 0%) ipa pure const : 0.01 ( 0%) 39k ( 0%) ipa modref : 0.01 ( 0%) 167k ( 0%) cfg cleanup : 0.01 ( 0%) 8008 ( 0%) CFG verifier : 0.13 ( 3%) 0 ( 0%) trivially dead code : 0.01 ( 0%) 0 ( 0%) df scan insns : 0.01 ( 0%) 2544 ( 0%) df live regs : 0.03 ( 1%) 0 ( 0%) df live&initialized regs : 0.01 ( 0%) 0 ( 0%) df reg dead/unused notes : 0.02 ( 0%) 634k ( 0%) alias analysis : 0.01 ( 0%) 719k ( 0%) alias stmt walking : 0.02 ( 1%) 155k ( 0%) preprocessing : 0.07 ( 2%) 4612k ( 2%) parser (global) : 0.12 ( 3%) 49M ( 21%) parser struct body : 0.11 ( 3%) 22M ( 10%) parser function body : 0.02 ( 1%) 1874k ( 1%) parser inl. func. body : 0.06 ( 2%) 6975k ( 3%) parser inl. meth. body : 0.12 ( 3%) 13M ( 6%) template instantiation : 0.47 ( 12%) 55M ( 24%) constant expression evaluation : 0.05 ( 1%) 2622k ( 1%) constraint normalization : 0.03 ( 1%) 1844k ( 1%) constraint satisfaction : 0.11 ( 3%) 8590k ( 4%) early inlining heuristics : 0.01 ( 0%) 466k ( 0%) inline parameters : 0.02 ( 1%) 1374k ( 1%) integration : 0.07 ( 2%) 17M ( 8%) tree gimplify : 0.02 ( 1%) 3852k ( 2%) tree CFG construction : 0.00 ( 0%) 1555k ( 1%) tree CFG cleanup : 0.05 ( 1%) 117k ( 0%) tree copy propagation : 0.01 ( 0%) 17k ( 0%) tree PTA : 0.03 ( 1%) 321k ( 0%) tree SSA rewrite : 0.01 ( 0%) 1033k ( 0%) tree SSA incremental : 0.02 ( 1%) 978k ( 0%) tree operand scan : 0.01 ( 0%) 3023k ( 1%) dominator optimization : 0.12 ( 3%) 2120k ( 1%) backwards jump threading : 0.01 ( 0%) 61k ( 0%) tree SRA : 0.01 ( 0%) 622k ( 0%) tree CCP : 0.05 ( 1%) 392k ( 0%) tree FRE : 0.04 ( 1%) 632k ( 0%) tree code sinking : 0.01 ( 0%) 747k ( 0%) tree linearize phis : 0.01 ( 0%) 109k ( 0%) tree forward propagate : 0.03 ( 1%) 345k ( 0%) tree conservative DCE : 0.01 ( 0%) 40k ( 0%) tree aggressive DCE : 0.01 ( 0%) 42k ( 0%) tree DSE : 0.02 ( 0%) 66k ( 0%) tree loop invariant motion : 0.01 ( 0%) 10k ( 0%) tree iv optimization : 0.01 ( 0%) 645k ( 0%) tree copy headers : 0.01 ( 0%) 184k ( 0%) tree SSA verifier : 0.20 ( 5%) 0 ( 0%) tree STMT verifier : 0.39 ( 10%) 0 ( 0%) tree modref : 0.01 ( 0%) 325k ( 0%) callgraph verifier : 0.02 ( 1%) 0 ( 0%) dominance computation : 0.07 ( 2%) 0 ( 0%) expand vars : 0.01 ( 0%) 394k ( 0%) expand : 0.03 ( 1%) 4796k ( 2%) forward prop : 0.02 ( 1%) 99k ( 0%) CSE : 0.02 ( 1%) 81k ( 0%) dead store elim1 : 0.02 ( 1%) 356k ( 0%) dead store elim2 : 0.02 ( 0%) 540k ( 0%) loop init : 0.05 ( 1%) 1583k ( 1%) branch prediction : 0.01 ( 0%) 245k ( 0%) combiner : 0.05 ( 1%) 1738k ( 1%) if-conversion : 0.01 ( 0%) 279k ( 0%) integrated RA : 0.08 ( 2%) 3314k ( 1%) LRA non-specific : 0.04 ( 1%) 435k ( 0%) LRA virtuals elimination : 0.01 ( 0%) 417k ( 0%) LRA reload inheritance : 0.01 ( 0%) 48k ( 0%) LRA create live ranges : 0.02 ( 0%) 81k ( 0%) reload CSE regs : 0.02 ( 1%) 372k ( 0%) thread pro- & epilogue : 0.02 ( 0%) 166k ( 0%) hard reg cprop : 0.01 ( 0%) 9456 ( 0%) reorder blocks : 0.01 ( 0%) 359k ( 0%) shorten branches : 0.01 ( 0%) 360 ( 0%) final : 0.02 ( 0%) 1156k ( 0%) access analysis : 0.02 ( 0%) 18k ( 0%) rest of compilation : 0.04 ( 1%) 726k ( 0%) remove unused locals : 0.01 ( 0%) 11k ( 0%) address taken : 0.01 ( 0%) 0 ( 0%) verify RTL sharing : 0.09 ( 2%) 0 ( 0%) repair loop structures : 0.01 ( 0%) 0 ( 0%) TOTAL : 3.83 231M Extra diagnostic checks enabled; compiler may run slowly. Configure with --enable-checking=release to disable checks. ``` At -O2 with checking: ``` $ g++ a.cxx -std=c++26 -O2 -ftime-report Time variable wall GGC phase setup : 0.01 ( 0%) 1813k ( 1%) phase parsing : 2.50 ( 24%) 134M ( 54%) phase lang. deferred : 0.87 ( 8%) 33M ( 13%) phase opt and generate : 7.19 ( 68%) 80M ( 32%) |name lookup : 0.34 ( 3%) 4534k ( 2%) |overload resolution : 0.77 ( 7%) 37M ( 15%) garbage collection : 1.25 ( 12%) 0 ( 0%) dump files : 0.01 ( 0%) 0 ( 0%) callgraph construction : 0.08 ( 1%) 2515k ( 1%) callgraph optimization : 0.05 ( 1%) 16k ( 0%) callgraph functions expansion : 5.28 ( 50%) 47M ( 19%) callgraph ipa passes : 1.71 ( 16%) 24M ( 10%) ipa function summary : 0.02 ( 0%) 552k ( 0%) ipa dead code removal : 0.01 ( 0%) 0 ( 0%) ipa cp : 0.03 ( 0%) 441k ( 0%) ipa inlining heuristics : 0.06 ( 1%) 1958k ( 1%) ipa function splitting : 0.01 ( 0%) 450k ( 0%) ipa pure const : 0.02 ( 0%) 32k ( 0%) ipa icf : 0.01 ( 0%) 0 ( 0%) ipa SRA : 0.01 ( 0%) 253k ( 0%) ipa modref : 0.02 ( 0%) 207k ( 0%) cfg cleanup : 0.07 ( 1%) 626k ( 0%) CFG verifier : 0.28 ( 3%) 0 ( 0%) trivially dead code : 0.02 ( 0%) 0 ( 0%) df scan insns : 0.02 ( 0%) 2736 ( 0%) df reaching defs : 0.05 ( 0%) 0 ( 0%) df live regs : 0.16 ( 2%) 0 ( 0%) df live&initialized regs : 0.06 ( 1%) 0 ( 0%) df use-def / def-use chains : 0.03 ( 0%) 0 ( 0%) df reg dead/unused notes : 0.05 ( 0%) 645k ( 0%) register information : 0.01 ( 0%) 0 ( 0%) alias analysis : 0.04 ( 0%) 1376k ( 1%) alias stmt walking : 0.06 ( 1%) 245k ( 0%) register scan : 0.01 ( 0%) 10k ( 0%) rebuild jump labels : 0.01 ( 0%) 96 ( 0%) preprocessing : 0.14 ( 1%) 4612k ( 2%) parser (global) : 0.30 ( 3%) 49M ( 20%) parser struct body : 0.29 ( 3%) 22M ( 9%) parser function body : 0.04 ( 0%) 1874k ( 1%) parser inl. func. body : 0.20 ( 2%) 6975k ( 3%) parser inl. meth. body : 0.28 ( 3%) 13M ( 6%) template instantiation : 0.96 ( 9%) 55M ( 22%) constant expression evaluation : 0.09 ( 1%) 2622k ( 1%) constraint normalization : 0.05 ( 1%) 1844k ( 1%) constraint satisfaction : 0.22 ( 2%) 8590k ( 3%) early inlining heuristics : 0.02 ( 0%) 512k ( 0%) inline parameters : 0.04 ( 0%) 1419k ( 1%) integration : 0.16 ( 2%) 18M ( 7%) tree gimplify : 0.05 ( 0%) 3921k ( 2%) tree eh : 0.01 ( 0%) 476k ( 0%) tree CFG construction : 0.01 ( 0%) 1590k ( 1%) tree CFG cleanup : 0.12 ( 1%) 224k ( 0%) tree tail merge : 0.01 ( 0%) 360k ( 0%) tree VRP : 0.14 ( 1%) 838k ( 0%) tree Early VRP : 0.07 ( 1%) 946k ( 0%) tree copy propagation : 0.02 ( 0%) 20k ( 0%) tree PTA : 0.10 ( 1%) 390k ( 0%) tree SSA rewrite : 0.01 ( 0%) 1046k ( 0%) tree SSA incremental : 0.06 ( 1%) 1265k ( 0%) tree operand scan : 0.02 ( 0%) 3446k ( 1%) dominator optimization : 0.20 ( 2%) 2187k ( 1%) backwards jump threading : 0.24 ( 2%) 2023k ( 1%) tree SRA : 0.03 ( 0%) 742k ( 0%) tree CCP : 0.10 ( 1%) 363k ( 0%) tree reassociation : 0.01 ( 0%) 13k ( 0%) tree PRE : 0.09 ( 1%) 1021k ( 0%) tree FRE : 0.12 ( 1%) 838k ( 0%) tree code sinking : 0.01 ( 0%) 786k ( 0%) tree linearize phis : 0.01 ( 0%) 119k ( 0%) tree forward propagate : 0.04 ( 0%) 339k ( 0%) tree conservative DCE : 0.01 ( 0%) 46k ( 0%) tree aggressive DCE : 0.02 ( 0%) 949k ( 0%) tree DSE : 0.03 ( 0%) 196k ( 0%) tree loop invariant motion : 0.01 ( 0%) 12k ( 0%) tree canonical iv : 0.01 ( 0%) 96k ( 0%) complete unrolling : 0.01 ( 0%) 231k ( 0%) tree vectorization : 0.01 ( 0%) 209k ( 0%) tree slp vectorization : 0.04 ( 0%) 2509k ( 1%) tree iv optimization : 0.02 ( 0%) 670k ( 0%) tree copy headers : 0.02 ( 0%) 193k ( 0%) tree SSA verifier : 0.43 ( 4%) 0 ( 0%) tree STMT verifier : 0.89 ( 8%) 0 ( 0%) tree strlen optimization : 0.02 ( 0%) 104k ( 0%) tree modref : 0.02 ( 0%) 482k ( 0%) callgraph verifier : 0.07 ( 1%) 0 ( 0%) dominance frontiers : 0.01 ( 0%) 0 ( 0%) dominance computation : 0.18 ( 2%) 0 ( 0%) out of ssa : 0.01 ( 0%) 9456 ( 0%) expand vars : 0.01 ( 0%) 397k ( 0%) expand : 0.06 ( 1%) 4759k ( 2%) post expand cleanups : 0.01 ( 0%) 557k ( 0%) lower subreg : 0.01 ( 0%) 17k ( 0%) forward prop : 0.06 ( 1%) 94k ( 0%) CSE : 0.10 ( 1%) 299k ( 0%) dead code elimination : 0.01 ( 0%) 0 ( 0%) dead store elim1 : 0.03 ( 0%) 336k ( 0%) dead store elim2 : 0.04 ( 0%) 575k ( 0%) loop init : 0.12 ( 1%) 2226k ( 1%) loop unrolling : 0.02 ( 0%) 108k ( 0%) CPROP : 0.08 ( 1%) 1059k ( 0%) PRE : 0.03 ( 0%) 122k ( 0%) CSE 2 : 0.06 ( 1%) 190k ( 0%) branch prediction : 0.02 ( 0%) 249k ( 0%) combiner : 0.10 ( 1%) 2128k ( 1%) late combiner : 0.06 ( 1%) 98k ( 0%) if-conversion : 0.01 ( 0%) 282k ( 0%) integrated RA : 0.18 ( 2%) 3802k ( 1%) LRA non-specific : 0.08 ( 1%) 474k ( 0%) LRA virtuals elimination : 0.02 ( 0%) 498k ( 0%) LRA reload inheritance : 0.01 ( 0%) 134k ( 0%) LRA create live ranges : 0.04 ( 0%) 78k ( 0%) LRA hard reg assignment : 0.01 ( 0%) 0 ( 0%) LRA rematerialization : 0.01 ( 0%) 0 ( 0%) reload CSE regs : 0.06 ( 1%) 737k ( 0%) ree : 0.01 ( 0%) 19k ( 0%) thread pro- & epilogue : 0.03 ( 0%) 160k ( 0%) peephole 2 : 0.01 ( 0%) 76k ( 0%) hard reg cprop : 0.02 ( 0%) 6696 ( 0%) scheduling 2 : 0.13 ( 1%) 241k ( 0%) machine dep reorg : 0.01 ( 0%) 42k ( 0%) reorder blocks : 0.01 ( 0%) 380k ( 0%) shorten branches : 0.01 ( 0%) 0 ( 0%) final : 0.03 ( 0%) 1160k ( 0%) access analysis : 0.04 ( 0%) 19k ( 0%) ext dce : 0.01 ( 0%) 0 ( 0%) fold mem offsets : 0.01 ( 0%) 79k ( 0%) rest of compilation : 0.08 ( 1%) 468k ( 0%) remove unused locals : 0.03 ( 0%) 1504 ( 0%) address taken : 0.01 ( 0%) 0 ( 0%) verify RTL sharing : 0.22 ( 2%) 0 ( 0%) repair loop structures : 0.01 ( 0%) 384 ( 0%) TOTAL : 10.57 250M Extra diagnostic checks enabled; compiler may run slowly. Configure with --enable-checking=release to disable checks. ``` .. so I can't yet reproduce.