diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-02 11:43:46 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-02 11:43:46 +0000 |
commit | 87e200413ff278de07c47cb21bbbbaac238864ec (patch) | |
tree | 7571e73ba6cb3202642afdc4b34430a313e9a3a3 /gcc/graphite-blocking.c | |
parent | 32819af552a46e7ee5814325586cabb5b86c9890 (diff) | |
download | gcc-87e200413ff278de07c47cb21bbbbaac238864ec.tar.gz |
2012-07-02 Richard Guenther <rguenther@suse.de>
Michael Matz <matz@suse.de>
Tobias Grosser <tobias@grosser.es>
Sebastian Pop <sebpop@gmail.com>
config/
* cloog.m4: Set up to work against ISL only.
* isl.m4: New file.
* Makefile.def: Add ISL host module, remove PPL host module.
Adjust ClooG host module to use the proper ISL.
* Makefile.tpl: Pass ISL include flags instead of PPL ones.
* configure.ac: Include config/isl.m4. Add ISL host library,
remove PPL. Remove PPL configury, add ISL configury, adjust
ClooG configury.
* Makefile.in: Regenerated.
* configure: Likewise.
gcc/
* Makefile.in: Remove PPL flags in favor of ISL ones.
(BACKENDLIBS): Remove PPL libs.
(INCLUDES): Remove PPL includes in favor of ISL ones.
(graphite-clast-to-gimple.o): Remove graphite-dependences.h and
graphite-cloog-compat.h dependencies.
(graphite-dependences.o): Likewise.
(graphite-poly.o): Likewise.
* configure.ac: Declare ISL vars instead of PPL ones.
* configure: Regenerated.
* doc/install.texi: Replace PPL requirement documentation
with ISL one.
* graphite-blocking.c: Remove PPL code, add ISL equivalent.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-poly.h: Likewise.
* graphite-poly.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* graphite-scop-detection.c: Re-arrange includes.
* graphite-cloog-util.c: Remove.
* graphite-cloog-util.h: Likewise.
* graphite-ppl.h: Likewise.
* graphite-ppl.c: Likewise.
* graphite-dependences.h: Likewise.
libgomp/
* testsuite/libgomp.graphite/force-parallel-4.c: Adjust.
* testsuite/libgomp.graphite/force-parallel-5.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-7.c: Likewise.
* testsuite/libgomp.graphite/force-parallel-8.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189156 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-blocking.c')
-rw-r--r-- | gcc/graphite-blocking.c | 81 |
1 files changed, 32 insertions, 49 deletions
diff --git a/gcc/graphite-blocking.c b/gcc/graphite-blocking.c index 967de9d9462..b4ac522850a 100644 --- a/gcc/graphite-blocking.c +++ b/gcc/graphite-blocking.c @@ -1,7 +1,7 @@ /* Heuristics and transform for loop blocking and strip mining on polyhedral representation. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Sebastian Pop <sebastian.pop@amd.com> and Pranav Garg <pranav.garg2107@gmail.com>. @@ -20,7 +20,18 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ + #include "config.h" + +#ifdef HAVE_cloog +#include <isl/set.h> +#include <isl/map.h> +#include <isl/union_map.h> +#include <isl/constraint.h> +#include <cloog/cloog.h> +#include <cloog/isl/domain.h> +#endif + #include "system.h" #include "coretypes.h" #include "tree-flow.h" @@ -31,8 +42,6 @@ along with GCC; see the file COPYING3. If not see #include "sese.h" #ifdef HAVE_cloog -#include "ppl_c.h" -#include "graphite-ppl.h" #include "graphite-poly.h" @@ -92,65 +101,39 @@ along with GCC; see the file COPYING3. If not see static void pbb_strip_mine_time_depth (poly_bb_p pbb, int time_depth, int stride) { - ppl_dimension_type iter, dim, strip; - ppl_Polyhedron_t res = PBB_TRANSFORMED_SCATTERING (pbb); + isl_space *d; + isl_constraint *c; + int iter, strip; /* STRIP is the dimension that iterates with stride STRIDE. */ /* ITER is the dimension that enumerates single iterations inside one strip that has at most STRIDE iterations. */ strip = time_depth; iter = strip + 2; - psct_add_scattering_dimension (pbb, strip); - psct_add_scattering_dimension (pbb, strip + 1); - - ppl_Polyhedron_space_dimension (res, &dim); + pbb->transformed = isl_map_insert_dims (pbb->transformed, isl_dim_out, + strip, 2); /* Lower bound of the striped loop. */ - { - ppl_Constraint_t new_cstr; - ppl_Linear_Expression_t expr; - - ppl_new_Linear_Expression_with_dimension (&expr, dim); - ppl_set_coef (expr, strip, -1 * stride); - ppl_set_coef (expr, iter, 1); - - ppl_new_Constraint (&new_cstr, expr, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL); - ppl_delete_Linear_Expression (expr); - ppl_Polyhedron_add_constraint (res, new_cstr); - ppl_delete_Constraint (new_cstr); - } + d = isl_map_get_space (pbb->transformed); + c = isl_inequality_alloc (isl_local_space_from_space (d)); + c = isl_constraint_set_coefficient_si (c, isl_dim_out, strip, -stride); + c = isl_constraint_set_coefficient_si (c, isl_dim_out, iter, 1); + pbb->transformed = isl_map_add_constraint (pbb->transformed, c); /* Upper bound of the striped loop. */ - { - ppl_Constraint_t new_cstr; - ppl_Linear_Expression_t expr; - - ppl_new_Linear_Expression_with_dimension (&expr, dim); - ppl_set_coef (expr, strip, stride); - ppl_set_coef (expr, iter, -1); - ppl_set_inhomogeneous (expr, stride - 1); - - ppl_new_Constraint (&new_cstr, expr, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL); - ppl_delete_Linear_Expression (expr); - ppl_Polyhedron_add_constraint (res, new_cstr); - ppl_delete_Constraint (new_cstr); - } + d = isl_map_get_space (pbb->transformed); + c = isl_inequality_alloc (isl_local_space_from_space (d)); + c = isl_constraint_set_coefficient_si (c, isl_dim_out, strip, stride); + c = isl_constraint_set_coefficient_si (c, isl_dim_out, iter, -1); + c = isl_constraint_set_constant_si (c, stride - 1); + pbb->transformed = isl_map_add_constraint (pbb->transformed, c); /* Static scheduling for ITER level. This is mandatory to keep the 2d + 1 canonical scheduling format. */ - { - ppl_Constraint_t new_cstr; - ppl_Linear_Expression_t expr; - - ppl_new_Linear_Expression_with_dimension (&expr, dim); - ppl_set_coef (expr, strip + 1, 1); - ppl_set_inhomogeneous (expr, 0); - - ppl_new_Constraint (&new_cstr, expr, PPL_CONSTRAINT_TYPE_EQUAL); - ppl_delete_Linear_Expression (expr); - ppl_Polyhedron_add_constraint (res, new_cstr); - ppl_delete_Constraint (new_cstr); - } + d = isl_map_get_space (pbb->transformed); + c = isl_equality_alloc (isl_local_space_from_space (d)); + c = isl_constraint_set_coefficient_si (c, isl_dim_out, strip + 1, 1); + pbb->transformed = isl_map_add_constraint (pbb->transformed, c); } /* Returns true when strip mining with STRIDE of the loop LST is |