aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-dependences.c
diff options
context:
space:
mode:
authorSebastian Pop <spop@gcc.gnu.org>2015-09-09 04:20:47 +0000
committerSebastian Pop <spop@gcc.gnu.org>2015-09-09 04:20:47 +0000
commit6b3ebcdda18d2b6b0e2bf3857726ab02fbac5ad4 (patch)
tree4ca18591bc257fbdfb434a9bb697b0b599004413 /gcc/graphite-dependences.c
parentb81c315682ec942ed0591d8f2d07ede43b4f3c84 (diff)
downloadgcc-6b3ebcdda18d2b6b0e2bf3857726ab02fbac5ad4.zip
gcc-6b3ebcdda18d2b6b0e2bf3857726ab02fbac5ad4.tar.gz
gcc-6b3ebcdda18d2b6b0e2bf3857726ab02fbac5ad4.tar.bz2
fix PR53852: stop ISL after a given number of operations
2015-09-02 Sebastian Pop <s.pop@samsung.com> * config.in: Regenerate. * configure: Regenerate. * configure.ac (HAVE_ISL_CTX_MAX_OPERATIONS): Detect. * graphite-optimize-isl.c (optimize_isl): Stop computation when PARAM_MAX_ISL_OPERATIONS is reached. * params.def (PARAM_MAX_ISL_OPERATIONS): Add. * graphite-dependences.c (extend_schedule): Remove gcc_asserts on result equal to isl_stat_ok as the status now can be isl_error_quota. (subtract_commutative_associative_deps): Same. (compute_deps): Same. testsuite/ * gcc.dg/graphite/uns-interchange-12.c: Adjust pattern to pass with both isl-0.12 and isl-0.15. * gcc.dg/graphite/uns-interchange-14.c: Same. * gcc.dg/graphite/uns-interchange-15.c: Same. * gcc.dg/graphite/uns-interchange-mvt.c: Same. From-SVN: r227572
Diffstat (limited to 'gcc/graphite-dependences.c')
-rw-r--r--gcc/graphite-dependences.c83
1 files changed, 35 insertions, 48 deletions
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index c3c2090..85f16f3 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -256,17 +256,12 @@ __isl_give isl_union_map *
extend_schedule (__isl_take isl_union_map *x)
{
int max = 0;
- isl_stat res;
struct extend_schedule_str str;
- res = isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
- gcc_assert (res == isl_stat_ok);
-
+ isl_union_map_foreach_map (x, max_number_of_out_dimensions, (void *) &max);
str.max = max;
str.umap = isl_union_map_empty (isl_union_map_get_space (x));
- res = isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str);
- gcc_assert (res == isl_stat_ok);
-
+ isl_union_map_foreach_map (x, extend_schedule_1, (void *) &str);
isl_union_map_free (x);
return str.umap;
}
@@ -395,7 +390,6 @@ subtract_commutative_associative_deps (scop_p scop,
FOR_EACH_VEC_ELT (pbbs, i, pbb)
if (PBB_IS_REDUCTION (pbb))
{
- int res;
isl_union_map *r = isl_union_map_empty (isl_space_copy (space));
isl_union_map *must_w = isl_union_map_empty (isl_space_copy (space));
isl_union_map *may_w = isl_union_map_empty (isl_space_copy (space));
@@ -432,27 +426,24 @@ subtract_commutative_associative_deps (scop_p scop,
(isl_union_map_copy (must_w), isl_union_map_copy (may_w));
empty = isl_union_map_empty (isl_union_map_get_space (all_w));
- res = isl_union_map_compute_flow (isl_union_map_copy (r),
- isl_union_map_copy (must_w),
- isl_union_map_copy (may_w),
- isl_union_map_copy (original),
- &x_must_raw, &x_may_raw,
- &x_must_raw_no_source,
- &x_may_raw_no_source);
- gcc_assert (res == 0);
- res = isl_union_map_compute_flow (isl_union_map_copy (all_w),
- r, empty,
- isl_union_map_copy (original),
- &x_must_war, &x_may_war,
- &x_must_war_no_source,
- &x_may_war_no_source);
- gcc_assert (res == 0);
- res = isl_union_map_compute_flow (all_w, must_w, may_w,
- isl_union_map_copy (original),
- &x_must_waw, &x_may_waw,
- &x_must_waw_no_source,
- &x_may_waw_no_source);
- gcc_assert (res == 0);
+ isl_union_map_compute_flow (isl_union_map_copy (r),
+ isl_union_map_copy (must_w),
+ isl_union_map_copy (may_w),
+ isl_union_map_copy (original),
+ &x_must_raw, &x_may_raw,
+ &x_must_raw_no_source,
+ &x_may_raw_no_source);
+ isl_union_map_compute_flow (isl_union_map_copy (all_w),
+ r, empty,
+ isl_union_map_copy (original),
+ &x_must_war, &x_may_war,
+ &x_must_war_no_source,
+ &x_may_war_no_source);
+ isl_union_map_compute_flow (all_w, must_w, may_w,
+ isl_union_map_copy (original),
+ &x_must_waw, &x_may_waw,
+ &x_must_waw_no_source,
+ &x_may_waw_no_source);
if (must_raw)
*must_raw = isl_union_map_subtract (*must_raw, x_must_raw);
@@ -551,26 +542,22 @@ compute_deps (scop_p scop, vec<poly_bb_p> pbbs,
isl_space *space = isl_union_map_get_space (all_writes);
isl_union_map *empty = isl_union_map_empty (space);
isl_union_map *original = scop_get_original_schedule (scop, pbbs);
- int res;
- res = isl_union_map_compute_flow (isl_union_map_copy (reads),
- isl_union_map_copy (must_writes),
- isl_union_map_copy (may_writes),
- isl_union_map_copy (original),
- must_raw, may_raw, must_raw_no_source,
- may_raw_no_source);
- gcc_assert (res == 0);
- res = isl_union_map_compute_flow (isl_union_map_copy (all_writes),
- reads, empty,
- isl_union_map_copy (original),
- must_war, may_war, must_war_no_source,
- may_war_no_source);
- gcc_assert (res == 0);
- res = isl_union_map_compute_flow (all_writes, must_writes, may_writes,
- isl_union_map_copy (original),
- must_waw, may_waw, must_waw_no_source,
- may_waw_no_source);
- gcc_assert (res == 0);
+ isl_union_map_compute_flow (isl_union_map_copy (reads),
+ isl_union_map_copy (must_writes),
+ isl_union_map_copy (may_writes),
+ isl_union_map_copy (original),
+ must_raw, may_raw, must_raw_no_source,
+ may_raw_no_source);
+ isl_union_map_compute_flow (isl_union_map_copy (all_writes),
+ reads, empty,
+ isl_union_map_copy (original),
+ must_war, may_war, must_war_no_source,
+ may_war_no_source);
+ isl_union_map_compute_flow (all_writes, must_writes, may_writes,
+ isl_union_map_copy (original),
+ must_waw, may_waw, must_waw_no_source,
+ may_waw_no_source);
subtract_commutative_associative_deps
(scop, pbbs, original,