From: Sebastian Pop <spop@codeaurora.org>
To: gcc-patches@gcc.gnu.org
Cc: hiraditya@msn.com, sebpop@gmail.com, richard.guenther@gmail.com,
Sebastian Pop <s.pop@samsung.com>
Subject: [PATCH 11/15] check for unstructured control flow
Date: Fri, 15 Jan 2016 17:15:00 -0000 [thread overview]
Message-ID: <1452878086-19297-11-git-send-email-sebpop@gmail.com> (raw)
In-Reply-To: <1452878086-19297-1-git-send-email-sebpop@gmail.com>
From: Sebastian Pop <s.pop@samsung.com>
* graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
Discard unstructured if-then-else regions.
---
gcc/graphite-scop-detection.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index a0c630b..f035e0d 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -1078,6 +1078,18 @@ scop_detection::harmful_loop_in_region (sese_l scop) const
return true;
}
+ /* Check for unstructured control flow: CFG not generated by structured
+ if-then-else. */
+ if (bb->succs->length () > 1)
+ {
+ edge e;
+ edge_iterator ei;
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (!dominated_by_p (CDI_POST_DOMINATORS, bb, e->dest)
+ && !dominated_by_p (CDI_DOMINATORS, e->dest, bb))
+ return true;
+ }
+
/* Collect all loops in the current region. */
loop_p loop = bb->loop_father;
if (loop_in_sese_p (loop, scop))
--
2.5.0
next prev parent reply other threads:[~2016-01-15 17:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 17:14 [PATCH 01/15] add more coalescing to simplify constraints Sebastian Pop
2016-01-15 17:15 ` [PATCH 02/15] remove unused variable Sebastian Pop
2016-01-15 17:15 ` [PATCH 05/15] remove tiling Sebastian Pop
2016-01-15 17:15 ` Sebastian Pop [this message]
2016-01-15 17:15 ` [PATCH 07/15] check that all loops are valid in the combined region Sebastian Pop
2016-01-15 17:15 ` [PATCH 10/15] rewrite computation of iteration domains Sebastian Pop
2016-01-15 17:15 ` [PATCH 06/15] fix codegen error exposed by compute isl flow patch Sebastian Pop
2016-01-15 17:15 ` [PATCH 03/15] fix PR68343: disable graphite tests for isl 0.14 or earlier Sebastian Pop
2016-01-15 17:15 ` [PATCH 08/15] record loops in execution order Sebastian Pop
2016-01-15 17:15 ` [PATCH 09/15] fix memory leak in scop-detection Sebastian Pop
2016-01-15 17:15 ` [PATCH 13/15] reinstantiate loop blocking Sebastian Pop
2016-01-15 17:15 ` [PATCH 04/15] add missing ast node for isl 0.15 Sebastian Pop
2016-01-15 17:16 ` [PATCH 12/15] new scop schedule Sebastian Pop
2016-01-21 14:22 ` [PATCH 01/15] add more coalescing to simplify constraints Matthew Wahab
2016-01-21 14:33 ` Matthew Wahab
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=1452878086-19297-11-git-send-email-sebpop@gmail.com \
--to=spop@codeaurora.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=hiraditya@msn.com \
--cc=richard.guenther@gmail.com \
--cc=s.pop@samsung.com \
--cc=sebpop@gmail.com \
/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: link
Be 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).