diff options
author | Aditya Kumar <aditya.k7@samsung.com> | 2016-01-21 02:13:42 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2016-01-21 02:13:42 +0000 |
commit | 8f2252625a841171aad0f7dda84f3811e03c7073 (patch) | |
tree | 59b1b491306770b9fbb56744e25e2c3dd4ab8da5 | |
parent | d8d262cf80dd8f7f2973eae13b641cb329d2315a (diff) | |
download | gcc-8f2252625a841171aad0f7dda84f3811e03c7073.zip gcc-8f2252625a841171aad0f7dda84f3811e03c7073.tar.gz gcc-8f2252625a841171aad0f7dda84f3811e03c7073.tar.bz2 |
check for unstructured control flow
* graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
Discard unstructured if-then-else regions.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r232657
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/graphite-scop-detection.c | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b593a8..7e5bf1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2016-01-21 Aditya Kumar <aditya.k7@samsung.com> Sebastian Pop <s.pop@samsung.com> + * graphite-scop-detection.c (scop_detection::harmful_loop_in_region): + Discard unstructured if-then-else regions. + +2016-01-21 Aditya Kumar <aditya.k7@samsung.com> + Sebastian Pop <s.pop@samsung.com> + * graphite-sese-to-poly.c (set_scop_parameter_dim): Remove. (cleanup_loop_iter_dom): Remove. (build_loop_iteration_domains): Remove. diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index d1b0fec..3f268a5 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)) |