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
This commit is contained in:
Sebastian Pop 2010-03-13 17:34:38 +00:00 committed by Sebastian Pop
parent d7ba5c3301
commit 4e7dd37645
4 changed files with 24 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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,