summaryrefslogtreecommitdiff
path: root/gcc/graphite-scop-detection.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-09-27 13:06:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-09-27 13:06:34 +0000
commit99124c31f9afaa8e713f3e1335d8e53c2ee61bc1 (patch)
tree583e879371e4870ee09a7e4b6505ebe81d9052b7 /gcc/graphite-scop-detection.c
parent84c8627ce00ccd0d1b644c8c72450626b3e111fd (diff)
graphite.h (scop::max_alias_set): New member.
2017-09-27 Richard Biener <rguenther@suse.de> * graphite.h (scop::max_alias_set): New member. * graphite-scop-detection.c: Remove references to non-existing --param in comments. (build_alias_sets): Record the maximum alias set used for drs. (build_scops): Support zero as unlimited for --param graphite-max-arrays-per-scop. * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove and inline into ... (build_poly_sr_1): ... here. Compute alias set based on the maximum alias set used for drs rather than PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP From-SVN: r253229
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r--gcc/graphite-scop-detection.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 3b1492fbfa8..351e944e9c8 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -389,10 +389,7 @@ public:
void remove_intersecting_scops (sese_l s1);
- /* Return true when a statement in SCOP cannot be represented by Graphite.
- The assumptions are that L1 dominates L2, and SCOP->entry dominates L1.
- Limit the number of bbs between adjacent loops to
- PARAM_SCOP_MAX_NUM_BBS_BETWEEN_LOOPS. */
+ /* Return true when a statement in SCOP cannot be represented by Graphite. */
bool harmful_loop_in_region (sese_l scop) const;
@@ -760,10 +757,7 @@ scop_detection::add_scop (sese_l s)
DEBUG_PRINT (dp << "[scop-detection] Adding SCoP: "; print_sese (dump_file, s));
}
-/* Return true when a statement in SCOP cannot be represented by Graphite.
- The assumptions are that L1 dominates L2, and SCOP->entry dominates L1.
- Limit the number of bbs between adjacent loops to
- PARAM_SCOP_MAX_NUM_BBS_BETWEEN_LOOPS. */
+/* Return true when a statement in SCOP cannot be represented by Graphite. */
bool
scop_detection::harmful_loop_in_region (sese_l scop) const
@@ -1531,7 +1525,8 @@ build_alias_set (scop_p scop)
for (i = 0; i < num_vertices; i++)
all_vertices[i] = i;
- graphds_dfs (g, all_vertices, num_vertices, NULL, true, NULL);
+ scop->max_alias_set
+ = graphds_dfs (g, all_vertices, num_vertices, NULL, true, NULL) + 1;
free (all_vertices);
for (i = 0; i < g->n_vertices; i++)
@@ -1755,7 +1750,8 @@ build_scops (vec<scop_p> *scops)
}
unsigned max_arrays = PARAM_VALUE (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP);
- if (scop->drs.length () >= max_arrays)
+ if (max_arrays > 0
+ && scop->drs.length () >= max_arrays)
{
DEBUG_PRINT (dp << "[scop-detection-fail] too many data references: "
<< scop->drs.length ()