public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/53695] [4.8 Regression] ICE: in dfs_enumerate_from, at cfganal.c:1221 with -O2 -ftracer and labels/gotos Date: Wed, 27 Jun 2012 10:33:00 -0000 [thread overview] Message-ID: <bug-53695-4-9VnfTUKthM@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53695-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53695 --- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-27 10:32:53 UTC --- I am testing Index: gcc/cfgloop.c =================================================================== *** gcc/cfgloop.c (revision 188987) --- gcc/cfgloop.c (working copy) *************** init_loops_structure (struct loops *loop *** 365,370 **** --- 365,406 ---- loops->tree_root = root; } + /* Return true if there is a path from FROM to the dominated TO where no + edge on that path contains FLAGS. */ + + static bool + path_without_edge_flags (basic_block from, basic_block to, int flags) + { + do + { + /* At least one such path to the immediate dominator. */ + if (single_pred_p (to)) + { + edge e = single_pred_edge (to); + if (e->flags & flags) + return false; + to = e->src; + } + else + { + basic_block dom = get_immediate_dominator (CDI_DOMINATORS, to); + edge_iterator ei; + edge e; + + FOR_EACH_EDGE(e, ei, to->preds) + if (!(e->flags & flags) + && (e->src == dom + || path_without_edge_flags (dom, e->src, flags))) + break; + + to = dom; + } + } + while (to != from); + + return true; + } + /* Find all the natural loops in the function and save in LOOPS structure and recalculate loop_depth information in basic block structures. Return the number of natural loops found. */ *************** flow_loops_find (struct loops *loops) *** 422,430 **** by this block. A natural loop has a single entry node (header) that dominates all the nodes in the loop. It also has single back edge to the header ! from a latch node. */ if (latch != ENTRY_BLOCK_PTR ! && dominated_by_p (CDI_DOMINATORS, latch, header)) { /* Shared headers should be eliminated by now. */ SET_BIT (headers, header->index); --- 458,470 ---- by this block. A natural loop has a single entry node (header) that dominates all the nodes in the loop. It also has single back edge to the header ! from a latch node. ! If there is no regular path from the header to the ! latch do not consider this latch (not worth the ! problems). */ if (latch != ENTRY_BLOCK_PTR ! && dominated_by_p (CDI_DOMINATORS, latch, header) ! && path_without_edge_flags (header, latch, EDGE_COMPLEX)) { /* Shared headers should be eliminated by now. */ SET_BIT (headers, header->index);
next prev parent reply other threads:[~2012-06-27 10:33 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-16 11:23 [Bug middle-end/53695] New: " zsojka at seznam dot cz 2012-06-16 16:01 ` [Bug middle-end/53695] " hjl.tools at gmail dot com 2012-06-18 9:03 ` rguenth at gcc dot gnu.org 2012-06-19 14:13 ` rguenth at gcc dot gnu.org 2012-06-27 10:33 ` rguenth at gcc dot gnu.org [this message] 2012-08-22 9:37 ` rguenth at gcc dot gnu.org 2012-08-22 19:26 ` steven at gcc dot gnu.org 2012-08-22 20:14 ` steven at gcc dot gnu.org 2012-08-22 20:20 ` steven at gcc dot gnu.org 2012-08-22 21:33 ` steven at gcc dot gnu.org 2012-08-23 7:29 ` rguenther at suse dot de 2012-08-23 7:37 ` rguenther at suse dot de 2012-08-23 7:56 ` stevenb.gcc at gmail dot com 2012-08-23 8:07 ` rguenther at suse dot de 2012-08-23 8:10 ` rguenther at suse dot de 2012-08-23 8:49 ` stevenb.gcc at gmail dot com 2012-08-23 8:53 ` steven at gcc dot gnu.org 2012-08-23 9:19 ` rguenther at suse dot de 2012-08-23 9:23 ` rguenther at suse dot de 2012-08-23 9:44 ` steven at gcc dot gnu.org 2012-08-23 11:00 ` rguenther at suse dot de 2012-08-23 11:22 ` rguenther at suse dot de 2012-09-19 13:31 ` rguenth at gcc dot gnu.org 2012-10-26 11:58 ` rguenth at gcc dot gnu.org 2012-10-29 14:25 ` rguenth at gcc dot gnu.org 2012-10-29 14:33 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-53695-4-9VnfTUKthM@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).