https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61515
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|memory-hog | Blocks| |47344 --- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Richard Biener from comment #7) > (In reply to Richard Biener from comment #6) > > 4.9 at -Os takes 5min and ~2.2GB of ram (points-to takes 20%, DF 33%) > > trunk at -Os takes 15min and ~2.1GB of ram (dominator optimization takes 67%) > > trunk at -O1 takes 14min and ~2GB of ram (still DOM at 62%) > > So it seems that on trunk DOM regressed a lot. Confirmed as 4.10 regression. With -O1 -fno-tree-dominator-opts behavior is sane: df reaching defs : 86.99 (28%) usr 36.53 (66%) sys 124.04 (34%) wall 0 kB ( 0%) ggc tree PTA : 10.31 ( 3%) usr 0.15 ( 0%) sys 10.47 ( 3%) wall 1948 kB ( 0%) ggc tree SSA incremental : 98.24 (31%) usr 8.39 (15%) sys 106.63 (29%) wall 13570 kB ( 1%) ggc tree loop invariant motion: 14.46 ( 5%) usr 0.10 ( 0%) sys 14.54 ( 4%) wall 14421 kB ( 1%) ggc scev constant prop : 11.14 ( 4%) usr 0.02 ( 0%) sys 11.18 ( 3%) wall 28795 kB ( 2%) ggc TOTAL : 312.10 55.72 368.92 1523092 kB 312.10user 55.84system 6:09.34elapsed 99%CPU (0avgtext+0avgdata 2073876maxresident)k 19664inputs+13880outputs (130major+38202143minor)pagefaults 0swaps (well, sane apart from DF and SSA incremental), but with DOM not disabled we get df reaching defs : 108.63 (11%) usr 8.83 (38%) sys 117.08 (12%) wall 0 kB ( 0%) ggc tree PTA : 10.51 ( 1%) usr 0.09 ( 0%) sys 10.60 ( 1%) wall 1948 kB ( 0%) ggc tree SSA incremental : 99.41 (10%) usr 9.17 (39%) sys 108.93 (11%) wall 13474 kB ( 1%) ggc dominator optimization : 617.08 (63%) usr 0.32 ( 1%) sys 618.97 (61%) wall 56878 kB ( 3%) ggc tree loop invariant motion: 2.15 ( 0%) usr 0.11 ( 0%) sys 2.25 ( 0%) wall 12012 kB ( 1%) ggc scev constant prop : 13.31 ( 1%) usr 0.02 ( 0%) sys 13.36 ( 1%) wall 28348 kB ( 2%) ggc TOTAL : 981.98 23.25 1007.67 1625119 kB 981.98user 23.34system 16:47.79elapsed 99%CPU (0avgtext+0avgdata 2071112maxresident)k 184inputs+66416outputs (5major+18571554minor)pagefaults 0swaps (yes, this is with release checking) The testcase has _lots_ of loops (~11000), inside a big outer one, the maximum nesting isn't too big (<10 from what I can see). SSA incremental is likely loop-closed SSA rewrite - didn't check. It should be possible to reduce the testcase somewhat if needed. Eventually the soulution for DOM is to disable the new path-based threading (if that turns out to be the issue) for -fno-expensive-optimizations (that is, optimize < 2).