[Bug tree-optimization/56466] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1629 (loop with header n not in loop tree !)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 27 09:41:00 GMT 2013


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-27 09:40:09 UTC ---
RTL unrolling does excessive manual verify_loop_structure calls.  I suppose
we can either add an argument to verify_loop_structure to say whether to
check only existing loops or remove the checking, or make sure to fixup
loops.

For sure checking the whole loop tree after processing one innermost loop
is excessive:

/* Depending on FLAGS, check whether to peel loops completely and do so.  */
static void
peel_loops_completely (int flags)
{
  struct loop *loop;
  loop_iterator li;

  /* Scan the loops, the inner ones first.  */
  FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST)
    {
...

      if (loop->lpt_decision.decision == LPT_PEEL_COMPLETELY)
        {
          report_unroll_peel (loop, locus);
          peel_loop_completely (loop);
#ifdef ENABLE_CHECKING
          verify_loop_structure ();
#endif
        }
    }

I'd have a changed flag and do a single

  if (changed)
    fix_loop_structure (NULL);

which also does the verification at the end.  Same applies to the loop
in the caller.



More information about the Gcc-bugs mailing list