diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-03-13 17:34:38 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-03-13 17:34:38 +0000 |
commit | 4e7dd37645ae785b9d4d1d06d24a4ee130f2f09b (patch) | |
tree | 303f56ba4063be24160da30c6e14b89cb2d66f3d /gcc | |
parent | d7ba5c330172dbc4beb203c74714dc732a6ae340 (diff) | |
download | gcc-4e7dd37645ae785b9d4d1d06d24a4ee130f2f09b.zip gcc-4e7dd37645ae785b9d4d1d06d24a4ee130f2f09b.tar.gz gcc-4e7dd37645ae785b9d4d1d06d24a4ee130f2f09b.tar.bz2 |
Limit the number of parameters per SCoP.
2010-03-09 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (build_poly_scop): Limit scops following
the number of parameters in the scop. Use as an upper bound
PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
* params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
* doc/invoke.texi: Document it.
From-SVN: r157431
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.graphite | 8 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 4 | ||||
-rw-r--r-- | gcc/graphite-sese-to-poly.c | 5 | ||||
-rw-r--r-- | gcc/params.def | 7 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 9dcdcda..61b463b 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,11 @@ +2010-03-09 Sebastian Pop <sebastian.pop@amd.com> + + * graphite-sese-to-poly.c (build_poly_scop): Limit scops following + the number of parameters in the scop. Use as an upper bound + PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS. + * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared. + * doc/invoke.texi: Document it. + 2010-03-05 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (add_param_constraints): Use diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 060be88..2159701 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -8492,6 +8492,10 @@ parameters only when their cumulative size is less or equal to @option{ipa-sra-ptr-growth-factor} times the size of the original pointer parameter. +@item graphite-max-nb-scop-params +To avoid exponential effects in the Graphite loop transforms, the +number of parameters in a SCoP is bounded by 10. + @end table @end table diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 11bddf8..ae4a083 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -2937,6 +2937,7 @@ build_poly_scop (scop_p scop) { sese region = SCOP_REGION (scop); sbitmap reductions = sbitmap_alloc (last_basic_block * 2); + graphite_dim_t max_dim; sbitmap_zero (reductions); rewrite_commutative_reductions_out_of_ssa (region, reductions); @@ -2960,6 +2961,10 @@ build_poly_scop (scop_p scop) build_sese_conditions (region); find_scop_parameters (scop); + max_dim = PARAM_VALUE (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS); + if (scop_nb_params (scop) > max_dim) + return false; + build_scop_iteration_domain (scop); build_scop_context (scop); diff --git a/gcc/params.def b/gcc/params.def index 07bfb90..f6f549c 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -745,6 +745,13 @@ DEFPARAM (PARAM_LOOP_BLOCK_TILE_SIZE, "size of tiles for loop blocking", 51, 0, 0) +/* Maximal number of parameters that we allow in a SCoP. */ + +DEFPARAM (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS, + "graphite-max-nb-scop-params", + "maximal number of parameters in a SCoP", + 10, 0, 0) + /* Avoid doing loop invariant motion on very large loops. */ DEFPARAM (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP, |