https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88597

            Bug ID: 88597
           Summary: Compile time hog w/ -O1 -fpeel-loops
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

All gcc versions down to 4.6 take inordinate time when compiling the following
snippet w/ -O1 -fpeel-loops --param max-completely-peel-times=27:

int
un (int dd)
{
  int nz, q8;

  for (nz = 0; nz < 3; ++nz)
    {
      int s2;

      q8 = dd;
      for (s2 = 0; s2 < 28; ++s2)
        q8 *= q8;
    }

  return q8;
}

perf top:

Overhead  Sha  Symbol
  56.05%  cc1  [.] instantiate_scev_r
  38.17%  cc1  [.] chrec_contains_undetermined
   5.77%  cc1  [.] is_gimple_min_invariant

It might be expected w/ max-completely-peel-times value that large, but gcc
4.5.3 compiles the testcase instantly.

Reply via email to