#define ONE while (b()) #define TEN ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE #define HUN TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN #define THOU HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN
void foo() { /* 11,000 nested whiles. */ THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU a(); } shows IRA taking 82% of compile-time wall time (25 seconds here at -O0) and needing 1 GB of memory. The reason why I'm reporting this, is that it seems to be quadratic or at least well superlinear. Changing it to 5500 loops requires only 300 MB. Not that it's the most important bug. -- Summary: IRA memory hog for insanely nested loops Product: gcc Version: unknown Status: UNCONFIRMED Keywords: memory-hog Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bonzini at gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40761