[Bug optimization/11555] [3.4 Regression] ICE in verify_loop_structure, at cfgloop.c:1270
rakdver at atrey dot karlin dot mff dot cuni dot cz
gcc-bugzilla@gcc.gnu.org
Thu Jul 24 18:55:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11555
------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2003-07-24 18:55 -------
Subject: Re: [3.4 Regression] ICE in verify_loop_structure, at cfgloop.c:1270
Hello,
I was mistakenly adding irreducible flag to all edges instead
only to those in copied region. I am commiting the following fix as
obvious.
Zdenek
* cfgloopmanip.c (duplicate_loop_to_header_edge): Update irreducible
flag correctly.
Index: cfgloopmanip.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgloopmanip.c,v
retrieving revision 1.14
diff -c -3 -p -r1.14 cfgloopmanip.c
*** cfgloopmanip.c 5 Jul 2003 15:17:26 -0000 1.14
--- cfgloopmanip.c 24 Jul 2003 18:45:05 -0000
*************** duplicate_loop_to_header_edge (struct lo
*** 988,993 ****
--- 988,1014 ----
/* Copy bbs. */
copy_bbs (bbs, n, new_bbs, spec_edges, 2, new_spec_edges, loop, loops);
+ /* Note whether the blocks and edges belong to an irreducible loop. */
+ if (add_irreducible_flag)
+ {
+ for (i = 0; i < n; i++)
+ new_bbs[i]->rbi->duplicated = 1;
+ for (i = 0; i < n; i++)
+ {
+ new_bb = new_bbs[i];
+ if (new_bb->loop_father == target)
+ new_bb->flags |= BB_IRREDUCIBLE_LOOP;
+
+ for (ae = new_bb->succ; ae; ae = ae->succ_next)
+ if (ae->dest->rbi->duplicated
+ && (ae->src->loop_father == target
+ || ae->dest->loop_father == target))
+ ae->flags |= EDGE_IRREDUCIBLE_LOOP;
+ }
+ for (i = 0; i < n; i++)
+ new_bbs[i]->rbi->duplicated = 0;
+ }
+
/* Redirect the special edges. */
if (is_latch)
{
*************** duplicate_loop_to_header_edge (struct lo
*** 1010,1031 ****
/* Record exit edge in this copy. */
if (orig && TEST_BIT (wont_exit, j + 1))
to_remove[(*n_to_remove)++] = new_spec_edges[SE_ORIG];
-
- /* Note whether the blocks and edges belong to an irreducible loop. */
- if (add_irreducible_flag)
- {
- for (i = 0; i < n; i++)
- {
- new_bb = new_bbs[i];
- if (new_bb->loop_father == target)
- new_bb->flags |= BB_IRREDUCIBLE_LOOP;
-
- for (ae = new_bb->succ; ae; ae = ae->succ_next)
- if (ae->src->loop_father == target
- || ae->dest->loop_father == target)
- ae->flags |= EDGE_IRREDUCIBLE_LOOP;
- }
- }
/* Record the first copy in the control flow order if it is not
the original loop (i.e. in case of peeling). */
--- 1031,1036 ----
More information about the Gcc-bugs
mailing list