diff options
author | Roman Gareev <gareevroman@gmail.com> | 2014-08-05 08:42:09 +0000 |
---|---|---|
committer | Roman Gareev <romangareev@gcc.gnu.org> | 2014-08-05 08:42:09 +0000 |
commit | 6a12a0041b602fcf10fd774152b91a3f302dd3eb (patch) | |
tree | 1346dc54457e79c8ba09a0942652fee1df80a1d4 | |
parent | 8cab83f05f81443dcd8783282c3600ef169945a6 (diff) | |
download | gcc-6a12a0041b602fcf10fd774152b91a3f302dd3eb.zip gcc-6a12a0041b602fcf10fd774152b91a3f302dd3eb.tar.gz gcc-6a12a0041b602fcf10fd774152b91a3f302dd3eb.tar.bz2 |
[gcc/]
* graphite-isl-ast-to-gimple.c:
(set_options): New function.
(scop_to_isl_ast): Add calling of set_options.
From-SVN: r213623
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/graphite-isl-ast-to-gimple.c | 20 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd8e820..660e826 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-08-05 Roman Gareev <gareevroman@gmail.com> + + * graphite-isl-ast-to-gimple.c: + (set_options): New function. + (scop_to_isl_ast): Add calling of set_options. + 2014-08-05 Jakub Jelinek <jakub@redhat.com> * loop-unroll.c (struct iv_to_split): Remove n_loc and loc fields. diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 8af6c7f..42393c3 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -867,6 +867,25 @@ ast_build_before_for (__isl_keep isl_ast_build *build, void *user) return id; } +/* Set the separate option for all dimensions. + This helps to reduce control overhead. */ + +static __isl_give isl_ast_build * +set_options (__isl_take isl_ast_build *control, + __isl_keep isl_union_map *schedule) +{ + isl_ctx *ctx = isl_union_map_get_ctx (schedule); + isl_space *range_space = isl_space_set_alloc (ctx, 0, 1); + range_space = + isl_space_set_tuple_name (range_space, isl_dim_set, "separate"); + isl_union_set *range = + isl_union_set_from_set (isl_set_universe (range_space)); + isl_union_set *domain = isl_union_map_range (isl_union_map_copy (schedule)); + domain = isl_union_set_universe (domain); + isl_union_map *options = isl_union_map_from_domain_and_range (domain, range); + return isl_ast_build_set_options (control, options); +} + static __isl_give isl_ast_node * scop_to_isl_ast (scop_p scop, ivs_params &ip) { @@ -879,6 +898,7 @@ scop_to_isl_ast (scop_p scop, ivs_params &ip) add_parameters_to_ivs_params (scop, ip); isl_union_map *schedule_isl = generate_isl_schedule (scop); isl_ast_build *context_isl = generate_isl_context (scop); + context_isl = set_options (context_isl, schedule_isl); isl_union_map *dependences = NULL; if (flag_loop_parallelize_all) { |