2012-07-04 11:15:09 +02:00
|
|
|
/* A scheduling optimizer for Graphite
|
2017-01-01 13:07:43 +01:00
|
|
|
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
2012-07-04 11:15:09 +02:00
|
|
|
Contributed by Tobias Grosser <tobias@grosser.es>.
|
|
|
|
|
|
|
|
This file is part of GCC.
|
|
|
|
|
|
|
|
GCC is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
GCC is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
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/>. */
|
|
|
|
|
2015-11-23 15:23:59 +01:00
|
|
|
#define USES_ISL
|
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
2014-08-18 17:42:11 +02:00
|
|
|
#ifdef HAVE_isl
|
2015-11-23 15:23:59 +01:00
|
|
|
|
|
|
|
#include "system.h"
|
|
|
|
#include "coretypes.h"
|
|
|
|
#include "backend.h"
|
|
|
|
#include "cfghooks.h"
|
|
|
|
#include "tree.h"
|
|
|
|
#include "gimple.h"
|
|
|
|
#include "fold-const.h"
|
|
|
|
#include "gimple-iterator.h"
|
|
|
|
#include "tree-ssa-loop.h"
|
|
|
|
#include "cfgloop.h"
|
|
|
|
#include "tree-data-ref.h"
|
|
|
|
#include "params.h"
|
|
|
|
#include "dumpfile.h"
|
2015-11-24 18:57:45 +01:00
|
|
|
#include "graphite.h"
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-10-27 16:58:05 +01:00
|
|
|
#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
|
2015-12-16 18:27:57 +01:00
|
|
|
/* isl 0.15 or later. */
|
2015-10-27 16:58:05 +01:00
|
|
|
|
|
|
|
/* get_schedule_for_node_st - Improve schedule for the schedule node.
|
|
|
|
Only Simple loop tiling is considered. */
|
|
|
|
|
|
|
|
static __isl_give isl_schedule_node *
|
|
|
|
get_schedule_for_node_st (__isl_take isl_schedule_node *node, void *user)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
2015-10-27 16:58:05 +01:00
|
|
|
if (user)
|
|
|
|
return node;
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-10-27 16:58:05 +01:00
|
|
|
if (isl_schedule_node_get_type (node) != isl_schedule_node_band
|
|
|
|
|| isl_schedule_node_n_children (node) != 1)
|
|
|
|
return node;
|
|
|
|
|
|
|
|
isl_space *space = isl_schedule_node_band_get_space (node);
|
|
|
|
unsigned dims = isl_space_dim (space, isl_dim_set);
|
|
|
|
isl_schedule_node *child = isl_schedule_node_get_child (node, 0);
|
|
|
|
isl_schedule_node_type type = isl_schedule_node_get_type (child);
|
|
|
|
isl_space_free (space);
|
|
|
|
isl_schedule_node_free (child);
|
|
|
|
|
|
|
|
if (type != isl_schedule_node_leaf)
|
|
|
|
return node;
|
|
|
|
|
|
|
|
if (dims <= 1 || !isl_schedule_node_band_get_permutable (node))
|
|
|
|
{
|
|
|
|
if (dump_file && dump_flags)
|
|
|
|
fprintf (dump_file, "not tiled\n");
|
|
|
|
return node;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Tile loops. */
|
|
|
|
space = isl_schedule_node_band_get_space (node);
|
|
|
|
isl_multi_val *sizes = isl_multi_val_zero (space);
|
|
|
|
long tile_size = PARAM_VALUE (PARAM_LOOP_BLOCK_TILE_SIZE);
|
|
|
|
isl_ctx *ctx = isl_schedule_node_get_ctx (node);
|
|
|
|
|
|
|
|
for (unsigned i = 0; i < dims; i++)
|
|
|
|
{
|
|
|
|
sizes = isl_multi_val_set_val (sizes, i,
|
|
|
|
isl_val_int_from_si (ctx, tile_size));
|
|
|
|
if (dump_file && dump_flags)
|
|
|
|
fprintf (dump_file, "tiled by %ld\n", tile_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
node = isl_schedule_node_band_tile (node, sizes);
|
|
|
|
node = isl_schedule_node_child (node, 0);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-10-27 16:58:05 +01:00
|
|
|
return node;
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
static isl_union_set *
|
|
|
|
scop_get_domains (scop_p scop)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
poly_bb_p pbb;
|
|
|
|
isl_space *space = isl_set_get_space (scop->param_context);
|
|
|
|
isl_union_set *res = isl_union_set_empty (space);
|
2015-10-27 16:58:05 +01:00
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
|
|
|
res = isl_union_set_add_set (res, isl_set_copy (pbb->domain));
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Compute the schedule for SCOP based on its parameters, domain and set of
|
|
|
|
constraints. Then apply the schedule to SCOP. */
|
2015-10-27 16:58:05 +01:00
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
static bool
|
|
|
|
optimize_isl (scop_p scop)
|
2015-10-27 16:58:05 +01:00
|
|
|
{
|
2016-01-26 01:19:20 +01:00
|
|
|
int old_max_operations = isl_ctx_get_max_operations (scop->isl_context);
|
|
|
|
int max_operations = PARAM_VALUE (PARAM_MAX_ISL_OPERATIONS);
|
|
|
|
if (max_operations)
|
|
|
|
isl_ctx_set_max_operations (scop->isl_context, max_operations);
|
|
|
|
isl_options_set_on_error (scop->isl_context, ISL_ON_ERROR_CONTINUE);
|
2015-10-27 16:58:05 +01:00
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
isl_union_set *domain = scop_get_domains (scop);
|
|
|
|
|
|
|
|
/* Simplify the dependences on the domain. */
|
|
|
|
scop_get_dependences (scop);
|
|
|
|
isl_union_map *dependences
|
|
|
|
= isl_union_map_gist_domain (isl_union_map_copy (scop->dependence),
|
|
|
|
isl_union_set_copy (domain));
|
|
|
|
isl_union_map *validity
|
|
|
|
= isl_union_map_gist_range (dependences, isl_union_set_copy (domain));
|
|
|
|
|
|
|
|
/* FIXME: proximity should not be validity. */
|
|
|
|
isl_union_map *proximity = isl_union_map_copy (validity);
|
|
|
|
|
|
|
|
isl_schedule_constraints *sc = isl_schedule_constraints_on_domain (domain);
|
|
|
|
sc = isl_schedule_constraints_set_proximity (sc, proximity);
|
|
|
|
sc = isl_schedule_constraints_set_validity (sc, isl_union_map_copy (validity));
|
|
|
|
sc = isl_schedule_constraints_set_coincidence (sc, validity);
|
|
|
|
|
|
|
|
isl_options_set_schedule_serialize_sccs (scop->isl_context, 0);
|
|
|
|
isl_options_set_schedule_maximize_band_depth (scop->isl_context, 1);
|
|
|
|
isl_options_set_schedule_max_constant_term (scop->isl_context, 20);
|
|
|
|
isl_options_set_schedule_max_coefficient (scop->isl_context, 20);
|
|
|
|
isl_options_set_tile_scale_tile_loops (scop->isl_context, 0);
|
|
|
|
/* Generate loop upper bounds that consist of the current loop iterator, an
|
|
|
|
operator (< or <=) and an expression not involving the iterator. If this
|
|
|
|
option is not set, then the current loop iterator may appear several times
|
|
|
|
in the upper bound. See the isl manual for more details. */
|
|
|
|
isl_options_set_ast_build_atomic_upper_bound (scop->isl_context, 1);
|
|
|
|
|
|
|
|
scop->transformed_schedule = isl_schedule_constraints_compute_schedule (sc);
|
|
|
|
scop->transformed_schedule =
|
|
|
|
isl_schedule_map_schedule_node_bottom_up (scop->transformed_schedule,
|
|
|
|
get_schedule_for_node_st, NULL);
|
|
|
|
isl_options_set_on_error (scop->isl_context, ISL_ON_ERROR_ABORT);
|
|
|
|
|
|
|
|
isl_ctx_reset_operations (scop->isl_context);
|
|
|
|
isl_ctx_set_max_operations (scop->isl_context, old_max_operations);
|
|
|
|
if (!scop->transformed_schedule
|
|
|
|
|| isl_ctx_last_error (scop->isl_context) == isl_error_quota)
|
|
|
|
{
|
|
|
|
if (dump_file && dump_flags)
|
|
|
|
fprintf (dump_file, "isl timed out --param max-isl-operations=%d\n",
|
|
|
|
max_operations);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
gcc_assert (scop->original_schedule);
|
|
|
|
isl_union_map *original = isl_schedule_get_map (scop->original_schedule);
|
|
|
|
isl_union_map *transformed = isl_schedule_get_map (scop->transformed_schedule);
|
|
|
|
bool same_schedule = isl_union_map_is_equal (original, transformed);
|
|
|
|
isl_union_map_free (original);
|
|
|
|
isl_union_map_free (transformed);
|
|
|
|
|
|
|
|
if (same_schedule)
|
|
|
|
{
|
|
|
|
if (dump_file)
|
|
|
|
{
|
|
|
|
fprintf (dump_file, "[scheduler] isl optimized schedule is "
|
|
|
|
"identical to the original schedule.\n");
|
|
|
|
print_schedule_ast (dump_file, scop->original_schedule, scop);
|
|
|
|
}
|
|
|
|
isl_schedule_free (scop->transformed_schedule);
|
|
|
|
scop->transformed_schedule = isl_schedule_copy (scop->original_schedule);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Apply graphite transformations to all the basic blocks of SCOP. */
|
|
|
|
|
|
|
|
bool
|
|
|
|
apply_poly_transforms (scop_p scop)
|
|
|
|
{
|
|
|
|
if (flag_loop_nest_optimize)
|
|
|
|
return optimize_isl (scop);
|
|
|
|
|
|
|
|
if (!flag_graphite_identity && !flag_loop_parallelize_all)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/* Generate code even if we did not apply any real transformation.
|
|
|
|
This also allows to check the performance for the identity
|
|
|
|
transformation: GIMPLE -> GRAPHITE -> GIMPLE. */
|
|
|
|
gcc_assert (scop->original_schedule);
|
|
|
|
scop->transformed_schedule = isl_schedule_copy (scop->original_schedule);
|
|
|
|
return true;
|
2015-10-27 16:58:05 +01:00
|
|
|
}
|
2016-01-26 01:19:20 +01:00
|
|
|
|
2015-10-27 16:58:05 +01:00
|
|
|
#else
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
/* get_tile_map - Create a map that describes a n-dimensonal tiling.
|
|
|
|
|
|
|
|
get_tile_map creates a map from a n-dimensional scattering space into an
|
2012-07-04 11:15:09 +02:00
|
|
|
2*n-dimensional scattering space. The map describes a rectangular tiling.
|
2015-09-11 21:50:41 +02:00
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
Example:
|
2015-09-11 21:50:41 +02:00
|
|
|
SCHEDULE_DIMENSIONS = 2, PARAMETER_DIMENSIONS = 1, TILE_SIZE = 32
|
|
|
|
|
|
|
|
tile_map := [p0] -> {[s0, s1] -> [t0, t1, s0, s1]:
|
|
|
|
t0 % 32 = 0 and t0 <= s0 < t0 + 32 and
|
|
|
|
t1 % 32 = 0 and t1 <= s1 < t1 + 32}
|
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
Before tiling:
|
2015-09-11 21:50:41 +02:00
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
for (i = 0; i < N; i++)
|
|
|
|
for (j = 0; j < M; j++)
|
2015-09-11 21:50:41 +02:00
|
|
|
S(i,j)
|
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
After tiling:
|
2015-09-11 21:50:41 +02:00
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
for (t_i = 0; t_i < N; i+=32)
|
|
|
|
for (t_j = 0; t_j < M; j+=32)
|
2015-09-11 21:50:41 +02:00
|
|
|
for (i = t_i; i < min(t_i + 32, N); i++) | Unknown that N % 32 = 0
|
|
|
|
for (j = t_j; j < t_j + 32; j++) | Known that M % 32 = 0
|
|
|
|
S(i,j)
|
|
|
|
*/
|
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
static isl_basic_map *
|
2015-09-11 21:50:41 +02:00
|
|
|
get_tile_map (isl_ctx *ctx, int schedule_dimensions, int tile_size)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
|
|
|
/* We construct
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
tile_map := [p0] -> {[s0, s1] -> [t0, t1, p0, p1, a0, a1]:
|
|
|
|
s0 = a0 * 32 and s0 = p0 and t0 <= p0 < t0 + 32 and
|
|
|
|
s1 = a1 * 32 and s1 = p1 and t1 <= p1 < t1 + 32}
|
2012-07-04 11:15:09 +02:00
|
|
|
|
|
|
|
and project out the auxilary dimensions a0 and a1. */
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_space *space
|
|
|
|
= isl_space_alloc (ctx, 0, schedule_dimensions, schedule_dimensions * 3);
|
|
|
|
isl_basic_map *tile_map = isl_basic_map_universe (isl_space_copy (space));
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_local_space *local_space = isl_local_space_from_space (space);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
for (int x = 0; x < schedule_dimensions; x++)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
|
|
|
int sX = x;
|
|
|
|
int tX = x;
|
2015-09-11 21:50:41 +02:00
|
|
|
int pX = schedule_dimensions + x;
|
|
|
|
int aX = 2 * schedule_dimensions + x;
|
2012-07-04 11:15:09 +02:00
|
|
|
|
|
|
|
isl_constraint *c;
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
/* sX = aX * tile_size; */
|
|
|
|
c = isl_equality_alloc (isl_local_space_copy (local_space));
|
alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
gimple.h, godump.c, graphite-clast-to-gimple.c,
graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
whitespace before "(".
From-SVN: r203004
2013-09-28 10:42:34 +02:00
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_out, sX, 1);
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_out, aX, -tile_size);
|
|
|
|
tile_map = isl_basic_map_add_constraint (tile_map, c);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
|
|
|
/* pX = sX; */
|
2015-09-11 21:50:41 +02:00
|
|
|
c = isl_equality_alloc (isl_local_space_copy (local_space));
|
alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
gimple.h, godump.c, graphite-clast-to-gimple.c,
graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
whitespace before "(".
From-SVN: r203004
2013-09-28 10:42:34 +02:00
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_out, pX, 1);
|
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_in, sX, -1);
|
2015-09-11 21:50:41 +02:00
|
|
|
tile_map = isl_basic_map_add_constraint (tile_map, c);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
|
|
|
/* tX <= pX */
|
2015-09-11 21:50:41 +02:00
|
|
|
c = isl_inequality_alloc (isl_local_space_copy (local_space));
|
alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
gimple.h, godump.c, graphite-clast-to-gimple.c,
graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
whitespace before "(".
From-SVN: r203004
2013-09-28 10:42:34 +02:00
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_out, pX, 1);
|
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_out, tX, -1);
|
2015-09-11 21:50:41 +02:00
|
|
|
tile_map = isl_basic_map_add_constraint (tile_map, c);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
/* pX <= tX + (tile_size - 1) */
|
|
|
|
c = isl_inequality_alloc (isl_local_space_copy (local_space));
|
alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
gimple.h, godump.c, graphite-clast-to-gimple.c,
graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
whitespace before "(".
From-SVN: r203004
2013-09-28 10:42:34 +02:00
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_out, tX, 1);
|
|
|
|
isl_constraint_set_coefficient_si (c, isl_dim_out, pX, -1);
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_constraint_set_constant_si (c, tile_size - 1);
|
|
|
|
tile_map = isl_basic_map_add_constraint (tile_map, c);
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
2013-07-21 20:31:07 +02:00
|
|
|
/* Project out auxiliary dimensions.
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
The auxiliary dimensions are transformed into existentially quantified
|
|
|
|
ones.
|
|
|
|
This reduces the number of visible scattering dimensions and allows isl
|
2012-07-04 11:15:09 +02:00
|
|
|
to produces better code. */
|
2015-09-11 21:50:41 +02:00
|
|
|
tile_map =
|
|
|
|
isl_basic_map_project_out (tile_map, isl_dim_out,
|
|
|
|
2 * schedule_dimensions, schedule_dimensions);
|
|
|
|
isl_local_space_free (local_space);
|
|
|
|
return tile_map;
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
/* get_schedule_for_band - Get the schedule for this BAND.
|
|
|
|
|
|
|
|
Polly applies transformations like tiling on top of the isl calculated
|
|
|
|
value.
|
2012-07-04 11:15:09 +02:00
|
|
|
This can influence the number of scheduling dimension. The number of
|
2015-09-11 21:50:41 +02:00
|
|
|
schedule dimensions is returned in DIMENSIONS. */
|
2012-07-04 11:15:09 +02:00
|
|
|
|
|
|
|
static isl_union_map *
|
2015-09-11 21:50:41 +02:00
|
|
|
get_schedule_for_band (isl_band *band, int *dimensions)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_union_map *partial_schedule;
|
2012-07-04 11:15:09 +02:00
|
|
|
isl_ctx *ctx;
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_space *space;
|
|
|
|
isl_basic_map *tile_map;
|
|
|
|
isl_union_map *tile_umap;
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
partial_schedule = isl_band_get_partial_schedule (band);
|
|
|
|
*dimensions = isl_band_n_member (band);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
|
|
|
/* It does not make any sense to tile a band with just one dimension. */
|
2015-09-11 21:50:41 +02:00
|
|
|
if (*dimensions == 1)
|
remove -floop-* flags
2015-08-27 Sebastian Pop <s.pop@samsung.com>
* Makefile.in (OBJS): Remove graphite-blocking.o and
graphite-interchange.o.
* common.opt (floop-strip-mine, floop-interchange, floop-block):
Alias of floop-nest-optimize.
* doc/invoke.texi (floop-strip-mine, floop-interchange, floop-block):
Document as alias of -floop-nest-optimize.
* graphite-blocking.c: Remove.
* graphite-interchange.c: Remove.
* graphite-optimize-isl.c: Include dumpfile.h.
(getScheduleForBand): Add dump for tiled loops. Use
PARAM_LOOP_BLOCK_TILE_SIZE instead of hard coded constant.
* graphite-poly.c (scop_max_loop_depth): Remove.
(print_scattering_function_1): Remove.
(print_scattering_function): Remove.
(print_scattering_functions): Remove.
(debug_scattering_function): Remove.
(debug_scattering_functions): Remove.
(apply_poly_transforms): Remove use of flag_loop_block,
flag_loop_strip_mine, and flag_loop_interchange.
(new_poly_bb): Remove use of PBB_TRANSFORMED, PBB_SAVED, and
PBB_ORIGINAL.
(print_pdr_access_layout): Remove.
(print_pdr): Print ISL representation.
(new_scop): Remove use of SCOP_ORIGINAL_SCHEDULE,
SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
(free_scop): Same.
(openscop_print_pbb_domain): Remove.
(print_pbb): Remove call to print_scattering_function.
(openscop_print_scop_context): Remove.
(print_scop_context): Do not print matrices anymore.
(print_scop): Do not print SCOP_ORIGINAL_SCHEDULE and
SCOP_TRANSFORMED_SCHEDULE.
(print_isl_set): Add printing of a new line.
(print_isl_map): Same.
(print_isl_aff): Same.
(print_isl_constraint): Same.
(loop_to_lst): Remove.
(scop_to_lst): Remove.
(lst_indent_to): Remove.
(print_lst): Remove.
(debug_lst): Remove.
(dot_lst_1): Remove.
(dot_lst): Remove.
(reverse_loop_at_level): Remove.
(reverse_loop_for_pbbs): Remove.
* graphite-poly.h (pdr_dim_iter_domain): Remove.
(pdr_nb_params): Remove.
(pdr_alias_set_dim): Remove.
(pdr_subscript_dim): Remove.
(pdr_iterator_dim): Remove.
(pdr_parameter_dim): Remove.
(same_pdr_p): Remove.
(struct poly_scattering): Remove.
(struct poly_bb): Remove _original, _transformed, _saved.
(PBB_DOMAIN, PBB_ORIGINAL, PBB_ORIGINAL_SCATTERING): Remove.
(PBB_TRANSFORMED, PBB_TRANSFORMED_SCATTERING, PBB_SAVED): Remove.
(PBB_NB_LOCAL_VARIABLES): Remove.
(PBB_NB_SCATTERING_TRANSFORM): Remove.
(schedule_to_scattering): Remove.
(number_of_write_pdrs): Remove.
(pbb_dim_iter_domain): Remove.
(pbb_nb_params): Remove.
(pbb_nb_scattering_orig): Remove.
(pbb_nb_scattering_transform): Remove.
(pbb_nb_dynamic_scattering_transform): Remove.
(pbb_nb_local_vars): Remove.
(pbb_iterator_dim): Remove.
(pbb_parameter_dim): Remove.
(psco_scattering_dim): Remove.
(psct_scattering_dim): Remove.
(psct_local_var_dim): Remove.
(psco_iterator_dim): Remove.
(psct_iterator_dim): Remove.
(psco_parameter_dim): Remove.
(psct_parameter_dim): Remove.
(psct_dynamic_dim): Remove.
(psct_static_dim): Remove.
(psct_add_local_variable): Remove.
(new_lst_loop): Remove.
(new_lst_stmt): Remove.
(free_lst): Remove.
(copy_lst): Remove.
(lst_add_loop_under_loop): Remove.
(lst_depth): Remove.
(lst_dewey_number): Remove.
(lst_dewey_number_at_depth): Remove.
(lst_pred): Remove.
(lst_succ): Remove.
(lst_find_pbb): Remove.
(find_lst_loop): Remove.
(lst_find_first_pbb): Remove.
(lst_empty_p): Remove.
(lst_find_last_pbb): Remove.
(lst_contains_p): Remove.
(lst_contains_pbb): Remove.
(lst_create_nest): Remove.
(lst_remove_from_sequence): Remove.
(lst_remove_loop_and_inline_stmts_in_loop_father): Remove.
(lst_niter_for_loop): Remove.
(pbb_update_scattering): Remove.
(lst_update_scattering_under): Remove.
(lst_update_scattering): Remove.
(lst_insert_in_sequence): Remove.
(lst_replace): Remove.
(lst_substitute_3): Remove.
(lst_distribute_lst): Remove.
(lst_remove_all_before_including_pbb): Remove.
(lst_remove_all_before_excluding_pbb): Remove.
(struct scop): Remove original_schedule, transformed_schedule, and
saved_schedule.
(SCOP_ORIGINAL_SCHEDULE, SCOP_TRANSFORMED_SCHEDULE): Remove.
(SCOP_SAVED_SCHEDULE): Remove.
(poly_scattering_new): Remove.
(poly_scattering_free): Remove.
(poly_scattering_copy): Remove.
(store_scattering_pbb): Remove.
(store_lst_schedule): Remove.
(restore_lst_schedule): Remove.
(store_scattering): Remove.
(restore_scattering_pbb): Remove.
(restore_scattering): Remove.
* graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
Remove scattering_dimensions. Do not use pbb_dim_iter_domain:
compute the scattering polyhedron dimension from the dimension of
pbb->domain.
(build_scop_scattering): Update call to
build_pbb_scattering_polyhedrons.
(build_poly_scop): Remove call to scop_to_lst.
* graphite.c (graphite_transform_loops): Add call to print_scop.
(gate_graphite_transforms): Remove use of flag_loop_block,
flag_loop_interchange, and flag_loop_strip_mine.
testsuite/
* gcc.dg/graphite/graphite.exp (interchange_files, block_files):
Replaced by opt_files, compile with -floop-nest-optimize.
* g++.dg/graphite/graphite.exp: Same.
* gfortran.dg/graphite/graphite.exp: Same.
* gcc.dg/graphite/block-0.c: Adjust pattern.
* gcc.dg/graphite/block-1.c: Same.
* gcc.dg/graphite/block-3.c: Same.
* gcc.dg/graphite/block-4.c: Same.
* gcc.dg/graphite/block-5.c: Same.
* gcc.dg/graphite/block-6.c: Same.
* gcc.dg/graphite/block-7.c: Same.
* gcc.dg/graphite/block-8.c: Same.
* gcc.dg/graphite/block-pr47654.c: Same.
* gcc.dg/graphite/interchange-0.c: Same.
* gcc.dg/graphite/interchange-1.c: Same.
* gcc.dg/graphite/interchange-10.c: Same.
* gcc.dg/graphite/interchange-11.c: Same.
* gcc.dg/graphite/interchange-12.c: Same.
* gcc.dg/graphite/interchange-13.c: Same.
* gcc.dg/graphite/interchange-14.c: Same.
* gcc.dg/graphite/interchange-15.c: Same.
* gcc.dg/graphite/interchange-3.c: Same.
* gcc.dg/graphite/interchange-4.c: Same.
* gcc.dg/graphite/interchange-5.c: Same.
* gcc.dg/graphite/interchange-6.c: Same.
* gcc.dg/graphite/interchange-7.c: Same.
* gcc.dg/graphite/interchange-8.c: Same.
* gcc.dg/graphite/interchange-9.c: Same.
* gcc.dg/graphite/interchange-mvt.c: Same.
* gcc.dg/graphite/pr37485.c: Same.
* gcc.dg/graphite/uns-block-1.c: Same.
* gcc.dg/graphite/uns-interchange-12.c: Same.
* gcc.dg/graphite/uns-interchange-14.c: Same.
* gcc.dg/graphite/uns-interchange-15.c: Same.
* gcc.dg/graphite/uns-interchange-9.c: Same.
* gcc.dg/graphite/uns-interchange-mvt.c: Same.
* gfortran.dg/graphite/interchange-3.f90: Same.
From-SVN: r227277
2015-08-27 21:07:04 +02:00
|
|
|
{
|
|
|
|
if (dump_file && dump_flags)
|
|
|
|
fprintf (dump_file, "not tiled\n");
|
2015-09-11 21:50:41 +02:00
|
|
|
return partial_schedule;
|
remove -floop-* flags
2015-08-27 Sebastian Pop <s.pop@samsung.com>
* Makefile.in (OBJS): Remove graphite-blocking.o and
graphite-interchange.o.
* common.opt (floop-strip-mine, floop-interchange, floop-block):
Alias of floop-nest-optimize.
* doc/invoke.texi (floop-strip-mine, floop-interchange, floop-block):
Document as alias of -floop-nest-optimize.
* graphite-blocking.c: Remove.
* graphite-interchange.c: Remove.
* graphite-optimize-isl.c: Include dumpfile.h.
(getScheduleForBand): Add dump for tiled loops. Use
PARAM_LOOP_BLOCK_TILE_SIZE instead of hard coded constant.
* graphite-poly.c (scop_max_loop_depth): Remove.
(print_scattering_function_1): Remove.
(print_scattering_function): Remove.
(print_scattering_functions): Remove.
(debug_scattering_function): Remove.
(debug_scattering_functions): Remove.
(apply_poly_transforms): Remove use of flag_loop_block,
flag_loop_strip_mine, and flag_loop_interchange.
(new_poly_bb): Remove use of PBB_TRANSFORMED, PBB_SAVED, and
PBB_ORIGINAL.
(print_pdr_access_layout): Remove.
(print_pdr): Print ISL representation.
(new_scop): Remove use of SCOP_ORIGINAL_SCHEDULE,
SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
(free_scop): Same.
(openscop_print_pbb_domain): Remove.
(print_pbb): Remove call to print_scattering_function.
(openscop_print_scop_context): Remove.
(print_scop_context): Do not print matrices anymore.
(print_scop): Do not print SCOP_ORIGINAL_SCHEDULE and
SCOP_TRANSFORMED_SCHEDULE.
(print_isl_set): Add printing of a new line.
(print_isl_map): Same.
(print_isl_aff): Same.
(print_isl_constraint): Same.
(loop_to_lst): Remove.
(scop_to_lst): Remove.
(lst_indent_to): Remove.
(print_lst): Remove.
(debug_lst): Remove.
(dot_lst_1): Remove.
(dot_lst): Remove.
(reverse_loop_at_level): Remove.
(reverse_loop_for_pbbs): Remove.
* graphite-poly.h (pdr_dim_iter_domain): Remove.
(pdr_nb_params): Remove.
(pdr_alias_set_dim): Remove.
(pdr_subscript_dim): Remove.
(pdr_iterator_dim): Remove.
(pdr_parameter_dim): Remove.
(same_pdr_p): Remove.
(struct poly_scattering): Remove.
(struct poly_bb): Remove _original, _transformed, _saved.
(PBB_DOMAIN, PBB_ORIGINAL, PBB_ORIGINAL_SCATTERING): Remove.
(PBB_TRANSFORMED, PBB_TRANSFORMED_SCATTERING, PBB_SAVED): Remove.
(PBB_NB_LOCAL_VARIABLES): Remove.
(PBB_NB_SCATTERING_TRANSFORM): Remove.
(schedule_to_scattering): Remove.
(number_of_write_pdrs): Remove.
(pbb_dim_iter_domain): Remove.
(pbb_nb_params): Remove.
(pbb_nb_scattering_orig): Remove.
(pbb_nb_scattering_transform): Remove.
(pbb_nb_dynamic_scattering_transform): Remove.
(pbb_nb_local_vars): Remove.
(pbb_iterator_dim): Remove.
(pbb_parameter_dim): Remove.
(psco_scattering_dim): Remove.
(psct_scattering_dim): Remove.
(psct_local_var_dim): Remove.
(psco_iterator_dim): Remove.
(psct_iterator_dim): Remove.
(psco_parameter_dim): Remove.
(psct_parameter_dim): Remove.
(psct_dynamic_dim): Remove.
(psct_static_dim): Remove.
(psct_add_local_variable): Remove.
(new_lst_loop): Remove.
(new_lst_stmt): Remove.
(free_lst): Remove.
(copy_lst): Remove.
(lst_add_loop_under_loop): Remove.
(lst_depth): Remove.
(lst_dewey_number): Remove.
(lst_dewey_number_at_depth): Remove.
(lst_pred): Remove.
(lst_succ): Remove.
(lst_find_pbb): Remove.
(find_lst_loop): Remove.
(lst_find_first_pbb): Remove.
(lst_empty_p): Remove.
(lst_find_last_pbb): Remove.
(lst_contains_p): Remove.
(lst_contains_pbb): Remove.
(lst_create_nest): Remove.
(lst_remove_from_sequence): Remove.
(lst_remove_loop_and_inline_stmts_in_loop_father): Remove.
(lst_niter_for_loop): Remove.
(pbb_update_scattering): Remove.
(lst_update_scattering_under): Remove.
(lst_update_scattering): Remove.
(lst_insert_in_sequence): Remove.
(lst_replace): Remove.
(lst_substitute_3): Remove.
(lst_distribute_lst): Remove.
(lst_remove_all_before_including_pbb): Remove.
(lst_remove_all_before_excluding_pbb): Remove.
(struct scop): Remove original_schedule, transformed_schedule, and
saved_schedule.
(SCOP_ORIGINAL_SCHEDULE, SCOP_TRANSFORMED_SCHEDULE): Remove.
(SCOP_SAVED_SCHEDULE): Remove.
(poly_scattering_new): Remove.
(poly_scattering_free): Remove.
(poly_scattering_copy): Remove.
(store_scattering_pbb): Remove.
(store_lst_schedule): Remove.
(restore_lst_schedule): Remove.
(store_scattering): Remove.
(restore_scattering_pbb): Remove.
(restore_scattering): Remove.
* graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
Remove scattering_dimensions. Do not use pbb_dim_iter_domain:
compute the scattering polyhedron dimension from the dimension of
pbb->domain.
(build_scop_scattering): Update call to
build_pbb_scattering_polyhedrons.
(build_poly_scop): Remove call to scop_to_lst.
* graphite.c (graphite_transform_loops): Add call to print_scop.
(gate_graphite_transforms): Remove use of flag_loop_block,
flag_loop_interchange, and flag_loop_strip_mine.
testsuite/
* gcc.dg/graphite/graphite.exp (interchange_files, block_files):
Replaced by opt_files, compile with -floop-nest-optimize.
* g++.dg/graphite/graphite.exp: Same.
* gfortran.dg/graphite/graphite.exp: Same.
* gcc.dg/graphite/block-0.c: Adjust pattern.
* gcc.dg/graphite/block-1.c: Same.
* gcc.dg/graphite/block-3.c: Same.
* gcc.dg/graphite/block-4.c: Same.
* gcc.dg/graphite/block-5.c: Same.
* gcc.dg/graphite/block-6.c: Same.
* gcc.dg/graphite/block-7.c: Same.
* gcc.dg/graphite/block-8.c: Same.
* gcc.dg/graphite/block-pr47654.c: Same.
* gcc.dg/graphite/interchange-0.c: Same.
* gcc.dg/graphite/interchange-1.c: Same.
* gcc.dg/graphite/interchange-10.c: Same.
* gcc.dg/graphite/interchange-11.c: Same.
* gcc.dg/graphite/interchange-12.c: Same.
* gcc.dg/graphite/interchange-13.c: Same.
* gcc.dg/graphite/interchange-14.c: Same.
* gcc.dg/graphite/interchange-15.c: Same.
* gcc.dg/graphite/interchange-3.c: Same.
* gcc.dg/graphite/interchange-4.c: Same.
* gcc.dg/graphite/interchange-5.c: Same.
* gcc.dg/graphite/interchange-6.c: Same.
* gcc.dg/graphite/interchange-7.c: Same.
* gcc.dg/graphite/interchange-8.c: Same.
* gcc.dg/graphite/interchange-9.c: Same.
* gcc.dg/graphite/interchange-mvt.c: Same.
* gcc.dg/graphite/pr37485.c: Same.
* gcc.dg/graphite/uns-block-1.c: Same.
* gcc.dg/graphite/uns-interchange-12.c: Same.
* gcc.dg/graphite/uns-interchange-14.c: Same.
* gcc.dg/graphite/uns-interchange-15.c: Same.
* gcc.dg/graphite/uns-interchange-9.c: Same.
* gcc.dg/graphite/uns-interchange-mvt.c: Same.
* gfortran.dg/graphite/interchange-3.f90: Same.
From-SVN: r227277
2015-08-27 21:07:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (dump_file && dump_flags)
|
|
|
|
fprintf (dump_file, "tiled by %d\n",
|
|
|
|
PARAM_VALUE (PARAM_LOOP_BLOCK_TILE_SIZE));
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
ctx = isl_union_map_get_ctx (partial_schedule);
|
|
|
|
space = isl_union_map_get_space (partial_schedule);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
tile_map = get_tile_map (ctx, *dimensions,
|
|
|
|
PARAM_VALUE (PARAM_LOOP_BLOCK_TILE_SIZE));
|
|
|
|
tile_umap = isl_union_map_from_map (isl_map_from_basic_map (tile_map));
|
|
|
|
tile_umap = isl_union_map_align_params (tile_umap, space);
|
2016-01-21 03:12:26 +01:00
|
|
|
tile_umap = isl_union_map_coalesce (tile_umap);
|
2015-09-11 21:50:41 +02:00
|
|
|
*dimensions = 2 * *dimensions;
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
return isl_union_map_apply_range (partial_schedule, tile_umap);
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
/* get_schedule_for_band_list - Get the scheduling map for a list of bands.
|
2015-08-27 21:06:56 +02:00
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
We walk recursively the forest of bands to combine the schedules of the
|
2015-09-11 21:50:41 +02:00
|
|
|
individual bands to the overall schedule. In case tiling is requested,
|
2015-08-27 21:06:56 +02:00
|
|
|
the individual bands are tiled. */
|
2015-09-11 21:50:48 +02:00
|
|
|
|
2012-07-04 11:15:09 +02:00
|
|
|
static isl_union_map *
|
2015-09-11 21:50:41 +02:00
|
|
|
get_schedule_for_band_list (isl_band_list *band_list)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
2015-09-11 21:50:41 +02:00
|
|
|
int num_bands, i;
|
|
|
|
isl_union_map *schedule;
|
2012-07-04 11:15:09 +02:00
|
|
|
isl_ctx *ctx;
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
ctx = isl_band_list_get_ctx (band_list);
|
|
|
|
num_bands = isl_band_list_n_band (band_list);
|
|
|
|
schedule = isl_union_map_empty (isl_space_params_alloc (ctx, 0));
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
for (i = 0; i < num_bands; i++)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_band *band;
|
|
|
|
isl_union_map *partial_schedule;
|
|
|
|
int schedule_dimensions;
|
|
|
|
isl_space *space;
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
band = isl_band_list_get_band (band_list, i);
|
|
|
|
partial_schedule = get_schedule_for_band (band, &schedule_dimensions);
|
|
|
|
space = isl_union_map_get_space (partial_schedule);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
if (isl_band_has_children (band))
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_band_list *children = isl_band_get_children (band);
|
|
|
|
isl_union_map *suffixSchedule
|
|
|
|
= get_schedule_for_band_list (children);
|
|
|
|
partial_schedule
|
|
|
|
= isl_union_map_flat_range_product (partial_schedule,
|
|
|
|
suffixSchedule);
|
|
|
|
isl_band_list_free (children);
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
2015-08-27 21:06:56 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
schedule = isl_union_map_union (schedule, partial_schedule);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_band_free (band);
|
|
|
|
isl_space_free (space);
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
2016-01-21 03:12:26 +01:00
|
|
|
return isl_union_map_coalesce (schedule);
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static isl_union_map *
|
2015-09-11 21:50:41 +02:00
|
|
|
get_schedule_map (isl_schedule *schedule)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
2016-01-21 03:12:26 +01:00
|
|
|
isl_band_list *band_list = isl_schedule_get_band_forest (schedule);
|
|
|
|
isl_union_map *schedule_map = get_schedule_for_band_list (band_list);
|
2016-01-21 11:50:30 +01:00
|
|
|
isl_band_list_free (band_list);
|
2015-09-11 21:50:41 +02:00
|
|
|
return schedule_map;
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
2015-07-21 20:33:35 +02:00
|
|
|
static isl_stat
|
2015-09-11 21:50:41 +02:00
|
|
|
get_single_map (__isl_take isl_map *map, void *user)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_map **single_map = (isl_map **)user;
|
|
|
|
*single_map = map;
|
2015-07-21 20:33:35 +02:00
|
|
|
return isl_stat_ok;
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2015-08-27 21:06:56 +02:00
|
|
|
apply_schedule_map_to_scop (scop_p scop, isl_union_map *schedule_map)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
poly_bb_p pbb;
|
|
|
|
|
2015-10-07 21:25:35 +02:00
|
|
|
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
2012-07-04 11:15:09 +02:00
|
|
|
{
|
|
|
|
isl_set *domain = isl_set_copy (pbb->domain);
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_map *stmt_schedule;
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_union_map *stmt_band
|
|
|
|
= isl_union_map_intersect_domain (isl_union_map_copy (schedule_map),
|
|
|
|
isl_union_set_from_set (domain));
|
2016-01-21 03:12:26 +01:00
|
|
|
stmt_band = isl_union_map_coalesce (stmt_band);
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_union_map_foreach_map (stmt_band, get_single_map, &stmt_schedule);
|
2015-08-27 21:06:56 +02:00
|
|
|
isl_map_free (pbb->transformed);
|
2016-01-21 03:12:26 +01:00
|
|
|
pbb->transformed = isl_map_coalesce (stmt_schedule);
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_union_map_free (stmt_band);
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-27 16:58:05 +01:00
|
|
|
static isl_union_set *
|
2016-01-21 03:12:26 +01:00
|
|
|
scop_get_domains (scop_p scop)
|
2015-10-27 16:58:05 +01:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
poly_bb_p pbb;
|
|
|
|
isl_space *space = isl_set_get_space (scop->param_context);
|
|
|
|
isl_union_set *res = isl_union_set_empty (space);
|
|
|
|
|
|
|
|
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
|
|
|
res = isl_union_set_add_set (res, isl_set_copy (pbb->domain));
|
|
|
|
|
2015-12-10 16:20:53 +01:00
|
|
|
return res;
|
2015-10-27 16:58:05 +01:00
|
|
|
}
|
|
|
|
|
2015-09-11 21:50:48 +02:00
|
|
|
/* Compute the schedule for SCOP based on its parameters, domain and set of
|
|
|
|
constraints. Then apply the schedule to SCOP. */
|
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
static bool
|
2012-07-04 11:15:09 +02:00
|
|
|
optimize_isl (scop_p scop)
|
|
|
|
{
|
2015-10-06 17:56:03 +02:00
|
|
|
int old_max_operations = isl_ctx_get_max_operations (scop->isl_context);
|
2015-09-09 06:20:47 +02:00
|
|
|
int max_operations = PARAM_VALUE (PARAM_MAX_ISL_OPERATIONS);
|
|
|
|
if (max_operations)
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_ctx_set_max_operations (scop->isl_context, max_operations);
|
|
|
|
isl_options_set_on_error (scop->isl_context, ISL_ON_ERROR_CONTINUE);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-09-09 06:20:47 +02:00
|
|
|
isl_union_set *domain = scop_get_domains (scop);
|
2015-12-16 18:33:07 +01:00
|
|
|
scop_get_dependences (scop);
|
|
|
|
scop->dependence
|
|
|
|
= isl_union_map_gist_domain (scop->dependence, isl_union_set_copy (domain));
|
|
|
|
scop->dependence
|
|
|
|
= isl_union_map_gist_range (scop->dependence, isl_union_set_copy (domain));
|
|
|
|
isl_union_map *validity = isl_union_map_copy (scop->dependence);
|
2015-09-09 06:20:47 +02:00
|
|
|
isl_union_map *proximity = isl_union_map_copy (validity);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-10-06 18:42:13 +02:00
|
|
|
isl_options_set_schedule_fuse (scop->isl_context, ISL_SCHEDULE_FUSE_MIN);
|
2015-09-09 06:20:47 +02:00
|
|
|
isl_schedule *schedule
|
|
|
|
= isl_union_set_compute_schedule (domain, validity, proximity);
|
2016-01-26 01:19:20 +01:00
|
|
|
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_options_set_on_error (scop->isl_context, ISL_ON_ERROR_ABORT);
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_ctx_reset_operations (scop->isl_context);
|
|
|
|
isl_ctx_set_max_operations (scop->isl_context, old_max_operations);
|
|
|
|
if (!schedule || isl_ctx_last_error (scop->isl_context) == isl_error_quota)
|
2015-09-09 06:20:47 +02:00
|
|
|
{
|
|
|
|
if (dump_file && dump_flags)
|
2016-01-28 17:39:18 +01:00
|
|
|
{
|
|
|
|
if (!schedule)
|
2016-01-28 19:23:24 +01:00
|
|
|
fprintf (dump_file, "isl did not return any schedule.\n");
|
2016-01-28 17:39:18 +01:00
|
|
|
else
|
|
|
|
fprintf (dump_file, "isl timed out --param max-isl-operations=%d\n",
|
|
|
|
max_operations);
|
|
|
|
}
|
|
|
|
|
2015-09-09 06:20:47 +02:00
|
|
|
if (schedule)
|
|
|
|
isl_schedule_free (schedule);
|
|
|
|
return false;
|
|
|
|
}
|
2012-07-04 11:15:09 +02:00
|
|
|
|
2015-12-17 00:40:06 +01:00
|
|
|
scop->schedule = schedule;
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
isl_union_map *schedule_map = get_schedule_map (schedule);
|
2015-11-24 00:28:42 +01:00
|
|
|
apply_schedule_map_to_scop (scop, schedule_map);
|
|
|
|
isl_union_map_free (schedule_map);
|
2016-01-26 01:19:20 +01:00
|
|
|
|
|
|
|
if (dump_file)
|
|
|
|
{
|
|
|
|
fprintf (dump_file, "isl end schedule:\n");
|
|
|
|
print_isl_schedule (dump_file, scop->schedule);
|
|
|
|
}
|
|
|
|
|
2015-11-24 00:28:42 +01:00
|
|
|
return true;
|
2012-07-04 11:15:09 +02:00
|
|
|
}
|
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
/* Apply graphite transformations to all the basic blocks of SCOP. */
|
|
|
|
|
|
|
|
bool
|
|
|
|
apply_poly_transforms (scop_p scop)
|
|
|
|
{
|
|
|
|
if (flag_loop_nest_optimize)
|
|
|
|
return optimize_isl (scop);
|
|
|
|
|
|
|
|
if (!flag_graphite_identity && !flag_loop_parallelize_all)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/* Generate code even if we did not apply any real transformation.
|
|
|
|
This also allows to check the performance for the identity
|
|
|
|
transformation: GIMPLE -> GRAPHITE -> GIMPLE. */
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS */
|
|
|
|
|
2015-09-11 21:50:41 +02:00
|
|
|
#endif /* HAVE_isl */
|