https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85072
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |compile-time-hog, | |memory-hog, ra Target| |x86_64-*-* Status|UNCONFIRMED |NEW Last reconfirmed| |2018-03-26 CC| |vmakarov at gcc dot gnu.org Component|c++ |rtl-optimization Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. It's LRA not finishing lra_assign () but eating memory in this loop: #2 0x0000000000a2e7f1 in init_live_reload_and_inheritance_pseudos () at /space/rguenther/src/svn/gcc-7-branch/gcc/lra-assigns.c:436 436 bitmap_set_bit (&live_reload_and_inheritance_pseudos[p], i); (gdb) l 431 &live_reload_and_inheritance_pseudos_bitmap_obstack); 432 for (i = lra_constraint_new_regno_start; i < max_regno; i++) 433 { 434 for (r = lra_reg_info[i].live_ranges; r != NULL; r = r->next) 435 for (p = r->start; p <= r->finish; p++) 436 bitmap_set_bit (&live_reload_and_inheritance_pseudos[p], i); 437 } with (gdb) p lra_constraint_new_regno_start $2 = 505484 (gdb) p max_regno $3 = 1010691 and just an example for one iteration: (gdb) p r->start $4 = 149038 (gdb) p r->finish $5 = 757257 (gdb) p lra_live_max_point $7 = 1013502 Looks like representing live_reload_and_inheritance_pseudos explicitely for a testcase like this is a bad idea. Vlad? Is there a way to make LRA cheaper at -O1, like turning off inheritance? Note the basic-blocks in this testcase are huge.