http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59992

            Bug ID: 59992
           Summary: [4.9 Regression] Compilation of insn-recog.c too slow
                    due to var-tracking
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: aoliva at gcc dot gnu.org

#define A(n) if (p[n]) { extern void foo##n (int, int, double, int, int); \
foo##n (p[n], 5, 8.0, p[n] + p[n + 1], 9); return; }
#define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) \
A(n##5) A(n##6) A(n##7) A(n##8) A(n##9)
#define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) \
B(n##5) B(n##6) B(n##7) B(n##8) B(n##9)
#define D(n) C(n##0) C(n##1) C(n##2) C(n##3) C(n##4) \
C(n##5) C(n##6) C(n##7) C(n##8) C(n##9)
#define E(n) D(n##0) D(n##1) D(n##2) D(n##3) D(n##4) \
D(n##5) D(n##6) D(n##7) D(n##8) D(n##9)

void
foo (int *p)
{
  E(1) E(2)
}

with -O2 -m32 -g on x86_64-linux takes just a few seconds to compile with 4.8,
but on trunk 13 minutes (--enable-checking=release).  This testcase is roughly
modelled after what insn-recog.c contains when built in
--enable-checking=yes,rtl compiler, and the important change has been the
switch to -mno-accumulate-outgoing-args.  Almost all time is spent in
vt_initialize -> 
cselib_preserve_only_values -> remove_useless_values.

Reply via email to