Commit d6bb5ccf by Sebastian Pop Committed by Sebastian Pop

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
parent 31da952a
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.
2015-08-27 Sebastian Pop <s.pop@samsung.com>
* common.opt (floop-unroll-and-jam): Make alias of floop-nest-optimize.
* doc/invoke.texi (-floop-unroll-and-jam): Document as alias of
-floop-nest-optimize.
......
......@@ -1277,10 +1277,8 @@ OBJS = \
graph.o \
graphds.o \
graphite.o \
graphite-blocking.o \
graphite-isl-ast-to-gimple.o \
graphite-dependences.o \
graphite-interchange.o \
graphite-optimize-isl.o \
graphite-poly.o \
graphite-scop-detection.o \
......
......@@ -1341,16 +1341,16 @@ Common Report Var(flag_loop_parallelize_all) Optimization
Mark all loops as parallel
floop-strip-mine
Common Report Var(flag_loop_strip_mine) Optimization
Enable Loop Strip Mining transformation
Common Alias(floop-nest-optimize)
Enable loop nest transforms. Same as -floop-nest-optimize
floop-interchange
Common Report Var(flag_loop_interchange) Optimization
Enable Loop Interchange transformation
Common Alias(floop-nest-optimize)
Enable loop nest transforms. Same as -floop-nest-optimize
floop-block
Common Report Var(flag_loop_block) Optimization
Enable Loop Blocking transformation
Common Alias(floop-nest-optimize)
Enable loop nest transforms. Same as -floop-nest-optimize
floop-unroll-and-jam
Common Alias(floop-nest-optimize)
......@@ -2315,8 +2315,8 @@ Common Report Var(flag_tree_loop_im) Init(1) Optimization
Enable loop invariant motion on trees
ftree-loop-linear
Common Alias(floop-interchange)
Enable loop interchange transforms. Same as -floop-interchange
Common Alias(floop-nest-optimize)
Enable loop nest transforms. Same as -floop-nest-optimize
ftree-loop-ivcanon
Common Report Var(flag_tree_loop_ivcanon) Init(1) Optimization
......
......@@ -8734,102 +8734,19 @@ Perform loop optimizations on trees. This flag is enabled by default
at @option{-O} and higher.
@item -ftree-loop-linear
@itemx -floop-interchange
@itemx -floop-strip-mine
@itemx -floop-block
@itemx -floop-unroll-and-jam
@opindex ftree-loop-linear
Perform loop interchange transformations on tree. Same as
@option{-floop-interchange}. To use this code transformation, GCC has
to be configured with @option{--with-isl} to enable the Graphite loop
transformation infrastructure.
@item -floop-interchange
@opindex floop-interchange
Perform loop interchange transformations on loops. Interchanging two
nested loops switches the inner and outer loops. For example, given a
loop like:
@smallexample
DO J = 1, M
DO I = 1, N
A(J, I) = A(J, I) * C
ENDDO
ENDDO
@end smallexample
@noindent
loop interchange transforms the loop as if it were written:
@smallexample
DO I = 1, N
DO J = 1, M
A(J, I) = A(J, I) * C
ENDDO
ENDDO
@end smallexample
which can be beneficial when @code{N} is larger than the caches,
because in Fortran, the elements of an array are stored in memory
contiguously by column, and the original loop iterates over rows,
potentially creating at each access a cache miss. This optimization
applies to all the languages supported by GCC and is not limited to
Fortran. To use this code transformation, GCC has to be configured
with @option{--with-isl} to enable the Graphite loop transformation
infrastructure.
@item -floop-strip-mine
@opindex floop-strip-mine
Perform loop strip mining transformations on loops. Strip mining
splits a loop into two nested loops. The outer loop has strides
equal to the strip size and the inner loop has strides of the
original loop within a strip. The strip length can be changed
using the @option{loop-block-tile-size} parameter. For example,
given a loop like:
@smallexample
DO I = 1, N
A(I) = A(I) + C
ENDDO
@end smallexample
@noindent
loop strip mining transforms the loop as if it were written:
@smallexample
DO II = 1, N, 51
DO I = II, min (II + 50, N)
A(I) = A(I) + C
ENDDO
ENDDO
@end smallexample
This optimization applies to all the languages supported by GCC and is
not limited to Fortran. To use this code transformation, GCC has to
be configured with @option{--with-isl} to enable the Graphite loop
transformation infrastructure.
@item -floop-block
@opindex floop-block
Perform loop blocking transformations on loops. Blocking strip mines
each loop in the loop nest such that the memory accesses of the
element loops fit inside caches. The strip length can be changed
using the @option{loop-block-tile-size} parameter. For example, given
a loop like:
@smallexample
DO I = 1, N
DO J = 1, M
A(J, I) = B(I) + C(J)
ENDDO
ENDDO
@end smallexample
@noindent
loop blocking transforms the loop as if it were written:
@smallexample
DO II = 1, N, 51
DO JJ = 1, M, 51
DO I = II, min (II + 50, N)
DO J = JJ, min (JJ + 50, M)
A(J, I) = B(I) + C(J)
ENDDO
ENDDO
ENDDO
ENDDO
@end smallexample
which can be beneficial when @code{M} is larger than the caches,
because the innermost loop iterates over a smaller amount of data
which can be kept in the caches. This optimization applies to all the
languages supported by GCC and is not limited to Fortran. To use this
code transformation, GCC has to be configured with @option{--with-isl}
to enable the Graphite loop transformation infrastructure.
@opindex floop-unroll-and-jam
Perform loop nest optimizations. Same as
@option{-floop-nest-optimize}. To use this code transformation, GCC has
to be configured with @option{--with-isl} to enable the Graphite loop
transformation infrastructure.
@item -fgraphite-identity
@opindex fgraphite-identity
......@@ -8847,13 +8764,6 @@ optimizer based on the Pluto optimization algorithms. It calculates a loop
structure optimized for data-locality and parallelism. This option
is experimental.
@item -floop-unroll-and-jam
@opindex floop-unroll-and-jam
Perform loop nest transformations. Same as
@option{-floop-nest-optimize}. To use this code transformation, GCC has
to be configured with @option{--with-isl} to enable the Graphite loop
transformation infrastructure.
@item -floop-parallelize-all
@opindex floop-parallelize-all
Use the Graphite data dependence analysis to identify loops that can
......
/* Heuristics and transform for loop blocking and strip mining on
polyhedral representation.
Copyright (C) 2009-2015 Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@amd.com> and
Pranav Garg <pranav.garg2107@gmail.com>.
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/>. */
#include "config.h"
#ifdef HAVE_isl
/* Workaround for GMP 5.1.3 bug, see PR56019. */
#include <stddef.h>
#include <isl/constraint.h>
#include <isl/set.h>
#include <isl/map.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "cfghooks.h"
#include "tree.h"
#include "gimple.h"
#include "params.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "tree-ssa-loop.h"
#include "dumpfile.h"
#include "cfgloop.h"
#include "tree-data-ref.h"
#include "graphite-poly.h"
/* Strip mines with a factor STRIDE the scattering (time) dimension
around PBB at depth TIME_DEPTH.
The following example comes from the wiki page:
http://gcc.gnu.org/wiki/Graphite/Strip_mine
The strip mine of a loop with a tile of 64 can be obtained with a
scattering function as follows:
$ cat ./albert_strip_mine.cloog
# language: C
c
# parameter {n | n >= 0}
1 3
# n 1
1 1 0
1
n
1 # Number of statements:
1
# {i | 0 <= i <= n}
2 4
# i n 1
1 1 0 0
1 -1 1 0
0 0 0
1
i
1 # Scattering functions
3 6
# NEW OLD i n 1
1 -64 0 1 0 0
1 64 0 -1 0 63
0 0 1 -1 0 0
1
NEW OLD
#the output of CLooG is like this:
#$ cloog ./albert_strip_mine.cloog
# for (NEW=0;NEW<=floord(n,64);NEW++) {
# for (OLD=max(64*NEW,0);OLD<=min(64*NEW+63,n);OLD++) {
# S1(i = OLD) ;
# }
# }
*/
static void
pbb_strip_mine_time_depth (poly_bb_p pbb, int time_depth, int stride)
{
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;
pbb->transformed = isl_map_insert_dims (pbb->transformed, isl_dim_out,
strip, 2);
/* Lower bound of the striped loop. */
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. */
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. */
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
profitable. */
static bool
lst_strip_mine_profitable_p (lst_p lst, int stride)
{
mpz_t niter, strip_stride;
bool res;
gcc_assert (LST_LOOP_P (lst));
mpz_init (strip_stride);
mpz_init (niter);
mpz_set_si (strip_stride, stride);
lst_niter_for_loop (lst, niter);
res = (mpz_cmp (niter, strip_stride) > 0);
mpz_clear (strip_stride);
mpz_clear (niter);
return res;
}
/* Strip-mines all the loops of LST with STRIDE. Return the number of
loops strip-mined. */
static int
lst_do_strip_mine_loop (lst_p lst, int depth, int stride)
{
int i;
lst_p l;
poly_bb_p pbb;
if (!lst)
return 0;
if (LST_LOOP_P (lst))
{
int res = 0;
FOR_EACH_VEC_ELT (LST_SEQ (lst), i, l)
res += lst_do_strip_mine_loop (l, depth, stride);
return res;
}
pbb = LST_PBB (lst);
pbb_strip_mine_time_depth (pbb, psct_dynamic_dim (pbb, depth), stride);
return 1;
}
/* Strip-mines all the loops of LST with STRIDE. When STRIDE is zero,
read the stride from the PARAM_LOOP_BLOCK_TILE_SIZE. Return the
number of strip-mined loops.
Strip mining transforms a loop
| for (i = 0; i < N; i++)
| S (i);
into the following loop nest:
| for (k = 0; k < N; k += STRIDE)
| for (j = 0; j < STRIDE; j++)
| S (i = k + j);
*/
static int
lst_do_strip_mine (lst_p lst, int stride)
{
int i;
lst_p l;
int res = 0;
int depth;
if (!stride)
stride = PARAM_VALUE (PARAM_LOOP_BLOCK_TILE_SIZE);
if (!lst
|| !LST_LOOP_P (lst))
return false;
FOR_EACH_VEC_ELT (LST_SEQ (lst), i, l)
res += lst_do_strip_mine (l, stride);
depth = lst_depth (lst);
if (depth >= 0
&& lst_strip_mine_profitable_p (lst, stride))
{
res += lst_do_strip_mine_loop (lst, lst_depth (lst), stride);
lst_add_loop_under_loop (lst);
}
return res;
}
/* Strip mines all the loops in SCOP. Returns the number of
strip-mined loops. */
int
scop_do_strip_mine (scop_p scop, int stride)
{
return lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop), stride);
}
/* Loop blocks all the loops in SCOP. Returns true when we manage to
block some loops. */
bool
scop_do_block (scop_p scop)
{
store_scattering (scop);
/* If we don't strip mine at least two loops, or not interchange
loops, the strip mine alone will not be profitable, and the
transform is not a loop blocking: so revert the transform. */
if (lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop), 0) < 2
|| scop_do_interchange (scop) == 0)
{
restore_scattering (scop);
return false;
}
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "SCoP will be loop blocked.\n");
return true;
}
#endif
......@@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-data-ref.h"
#include "graphite-poly.h"
#include "params.h"
#include "dumpfile.h"
static isl_union_set *
scop_get_domains (scop_p scop ATTRIBUTE_UNUSED)
......@@ -177,12 +178,21 @@ getScheduleForBand (isl_band *Band, int *Dimensions)
/* It does not make any sense to tile a band with just one dimension. */
if (*Dimensions == 1)
return PartialSchedule;
{
if (dump_file && dump_flags)
fprintf (dump_file, "not tiled\n");
return PartialSchedule;
}
if (dump_file && dump_flags)
fprintf (dump_file, "tiled by %d\n",
PARAM_VALUE (PARAM_LOOP_BLOCK_TILE_SIZE));
ctx = isl_union_map_get_ctx (PartialSchedule);
Space = isl_union_map_get_space (PartialSchedule);
TileMap = getTileMap (ctx, *Dimensions, 32);
TileMap = getTileMap (ctx, *Dimensions,
PARAM_VALUE (PARAM_LOOP_BLOCK_TILE_SIZE));
TileUMap = isl_union_map_from_map (isl_map_from_basic_map (TileMap));
TileUMap = isl_union_map_align_params (TileUMap, Space);
*Dimensions = 2 * *Dimensions;
......
......@@ -443,18 +443,12 @@ isl_id_for_pbb (scop_p s, poly_bb_p pbb)
/* Converts the STATIC_SCHEDULE of PBB into a scattering polyhedron.
We generate SCATTERING_DIMENSIONS scattering dimensions.
CLooG 0.15.0 and previous versions require, that all
scattering functions of one CloogProgram have the same number of
scattering dimensions, therefore we allow to specify it. This
should be removed in future versions of CLooG.
The scattering polyhedron consists of these dimensions: scattering,
loop_iterators, parameters.
Example:
| scattering_dimensions = 5
| used_scattering_dimensions = 3
| nb_iterators = 1
| scop_nb_params = 2
|
......@@ -475,15 +469,13 @@ isl_id_for_pbb (scop_p s, poly_bb_p pbb)
static void
build_pbb_scattering_polyhedrons (isl_aff *static_sched,
poly_bb_p pbb, int scattering_dimensions)
poly_bb_p pbb)
{
int i;
int nb_iterators = pbb_dim_iter_domain (pbb);
int used_scattering_dimensions = nb_iterators * 2 + 1;
isl_val *val;
isl_space *dc, *dm;
gcc_assert (scattering_dimensions >= used_scattering_dimensions);
int scattering_dimensions = isl_set_dim (pbb->domain, isl_dim_set) * 2 + 1;
dc = isl_set_get_space (pbb->domain);
dm = isl_space_add_dims (isl_space_from_domain (dc),
......@@ -577,7 +569,6 @@ build_scop_scattering (scop_p scop)
{
gimple_bb_p gbb = PBB_BLACK_BOX (pbb);
int prefix;
int nb_scat_dims = pbb_dim_iter_domain (pbb) * 2 + 1;
if (previous_gbb)
prefix = nb_common_loops (SCOP_REGION (scop), previous_gbb, gbb);
......@@ -588,7 +579,7 @@ build_scop_scattering (scop_p scop)
static_sched = isl_aff_add_coefficient_si (static_sched, isl_dim_in,
prefix, 1);
build_pbb_scattering_polyhedrons (static_sched, pbb, nb_scat_dims);
build_pbb_scattering_polyhedrons (static_sched, pbb);
}
isl_aff_free (static_sched);
......@@ -3103,7 +3094,7 @@ rewrite_commutative_reductions_out_of_ssa (scop_p scop)
}
/* Can all ivs be represented by a signed integer?
As CLooG might generate negative values in its expressions, signed loop ivs
As ISL might generate negative values in its expressions, signed loop ivs
are required in the backend. */
static bool
......@@ -3149,9 +3140,7 @@ build_poly_scop (scop_p scop)
build_scop_bbs (scop);
/* FIXME: This restriction is needed to avoid a problem in CLooG.
Once CLooG is fixed, remove this guard. Anyways, it makes no
sense to optimize a scop containing only PBBs that do not belong
/* Do not optimize a scop containing only PBBs that do not belong
to any loops. */
if (nb_pbbs_in_loops (scop) == 0)
return;
......@@ -3182,7 +3171,6 @@ build_poly_scop (scop_p scop)
rewrite_cross_bb_scalar_deps_out_of_ssa (scop);
build_scop_drs (scop);
scop_to_lst (scop);
build_scop_scattering (scop);
/* This SCoP has been translated to the polyhedral
......
......@@ -25,12 +25,7 @@ along with GCC; see the file COPYING3. If not see
An early description of this pass can be found in the GCC Summit'06
paper "GRAPHITE: Polyhedral Analyses and Optimizations for GCC".
The wiki page http://gcc.gnu.org/wiki/Graphite contains pointers to
the related work.
One important document to read is CLooG's internal manual:
http://repo.or.cz/w/cloog-ppl.git?a=blob_plain;f=doc/cloog.texi;hb=HEAD
that describes the data structure of loops used in this file, and
the functions that are used for transforming the code. */
the related work. */
#include "config.h"
......@@ -286,6 +281,9 @@ graphite_transform_loops (void)
scop->ctx = ctx;
build_poly_scop (scop);
if (dump_file && dump_flags)
print_scop (dump_file, scop, 3);
if (POLY_SCOP_P (scop)
&& apply_poly_transforms (scop)
&& graphite_regenerate_ast_isl (scop))
......@@ -326,10 +324,7 @@ gate_graphite_transforms (void)
{
/* Enable -fgraphite pass if any one of the graphite optimization flags
is turned on. */
if (flag_loop_block
|| flag_loop_interchange
|| flag_loop_strip_mine
|| flag_graphite_identity
if (flag_graphite_identity
|| flag_loop_parallelize_all
|| flag_loop_optimize_isl)
flag_graphite = 1;
......
2015-08-27 Sebastian Pop <s.pop@samsung.com>
* 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.
2015-08-27 Uros Bizjak <ubizjak@gmail.com>
PR target/67317
......
......@@ -41,8 +41,8 @@ set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.C ] ]
set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.C ] ]
set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.C ] ]
set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.C ] ]
set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.C ] ]
set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.C ] ]
set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.C \
$srcdir/$subdir/block-*.C ] ]
# Tests to be compiled.
set dg-do-what-default compile
......@@ -52,16 +52,14 @@ g++-dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math"
# Tests to be run.
set dg-do-what-default run
g++-dg-runtest $run_id_files "" "-O2 -fgraphite-identity"
g++-dg-runtest $interchange_files "" "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
g++-dg-runtest $block_files "" "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
g++-dg-runtest $opt_files "" "-O2 -floop-nest-optimize -ffast-math -fdump-tree-graphite-all"
# The default action for the rest of the files is 'compile'.
set dg-do-what-default compile
foreach f $scop_files {lremove wait_to_run_files $f}
foreach f $id_files {lremove wait_to_run_files $f}
foreach f $run_id_files {lremove wait_to_run_files $f}
foreach f $interchange_files {lremove wait_to_run_files $f}
foreach f $block_files {lremove wait_to_run_files $f}
foreach f $opt_files {lremove wait_to_run_files $f}
g++-dg-runtest $wait_to_run_files "" "-pedantic-errors"
# Clean up.
......
......@@ -42,4 +42,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-not "will be loop blocked" "graphite" } } */
/* { dg-final { scan-tree-dump-times "not tiled" 3 "graphite" } } */
......@@ -45,4 +45,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 3 "graphite" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "tiled by" 5 "graphite" } } */
......@@ -17,7 +17,7 @@ foo (void)
{
int i, j, k;
/* These loops contain too few iterations to be blocked by 64. */
/* These loops contain too few iterations to be blocked. */
for (i = 0; i < 24; i++)
for (j = 0; j < 24; j++)
for (k = 0; k < 24; k++)
......@@ -58,4 +58,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */
......@@ -16,7 +16,7 @@ foo (void)
{
int i, j, k;
/* This should NOT be blocked: each loop iterates only 24 times. */
/* This should NOT be blocked. */
for (i = 0; i < 24; i++)
for (j = 0; j < 24; j++)
for (k = 0; k < 24; k++)
......@@ -57,4 +57,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */
......@@ -53,4 +53,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */
......@@ -48,4 +48,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 0 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */
......@@ -54,4 +54,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 6 "graphite" } } */
......@@ -55,4 +55,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */
......@@ -21,4 +21,4 @@ main ()
return 0;
}
/* { dg-final { scan-tree-dump-not "will be loop blocked" "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 1 "graphite" } } */
......@@ -41,10 +41,10 @@ set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.c ] ]
set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.c ] ]
set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.c ] ]
set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.c ] ]
set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \
$srcdir/$subdir/uns-interchange-*.c ] ]
set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.c \
$srcdir/$subdir/uns-block-*.c ] ]
set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.c \
$srcdir/$subdir/uns-interchange-*.c \
$srcdir/$subdir/block-*.c \
$srcdir/$subdir/uns-block-*.c ] ]
set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.c ] ]
# Tests to be compiled.
......@@ -55,8 +55,7 @@ dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math"
# Tests to be run.
set dg-do-what-default run
dg-runtest $run_id_files "" "-O2 -fgraphite-identity"
dg-runtest $interchange_files "" "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
dg-runtest $block_files "" "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
dg-runtest $opt_files "" "-O2 -ffast-math -floop-nest-optimize -fdump-tree-graphite-all"
# Vectorizer tests, to be run or compiled, depending on target capabilities.
global DEFAULT_VECTCFLAGS
......@@ -71,8 +70,7 @@ set dg-do-what-default compile
foreach f $scop_files {lremove wait_to_run_files $f}
foreach f $id_files {lremove wait_to_run_files $f}
foreach f $run_id_files {lremove wait_to_run_files $f}
foreach f $interchange_files {lremove wait_to_run_files $f}
foreach f $block_files {lremove wait_to_run_files $f}
foreach f $opt_files {lremove wait_to_run_files $f}
foreach f $vect_files {lremove wait_to_run_files $f}
dg-runtest $wait_to_run_files "" "-ansi -pedantic-errors"
......
......@@ -46,4 +46,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -49,4 +49,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -46,4 +46,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 2 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */
......@@ -46,4 +46,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -53,4 +53,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "tiled by" 5 "graphite" } } */
......@@ -50,4 +50,4 @@ main (void)
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -54,5 +54,4 @@ main (void)
return 0;
}
/* PRE destroys the perfect nest and we can't cope with that yet. */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */
......@@ -48,6 +48,4 @@ main (void)
return 0;
}
/* PRE destroys the perfect nest and we can't cope with that yet. */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */
......@@ -47,4 +47,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -46,4 +46,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -46,4 +46,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -47,4 +47,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -46,4 +46,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -82,4 +82,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 2 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 5 "graphite" } } */
......@@ -44,4 +44,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */
......@@ -58,6 +58,4 @@ main (void)
return 0;
}
/* PRE destroys the perfect nest and we can't cope with that yet. */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "tiled by" 7 "graphite" } } */
/* { dg-options "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all" } */
/* { dg-options "-O2 -floop-block -ffast-math -fdump-tree-graphite-all" } */
typedef unsigned char UChar;
typedef int Int32;
......@@ -30,4 +30,5 @@ void fallbackSort ( UInt32* fmap,
}
AssertH ( j < 256, 1005 );
}
/* { dg-final { scan-tree-dump-times "Loop blocked" 1 "graphite" { xfail *-*-* }} } */
/* { dg-final { scan-tree-dump-times "tiled by" 1 "graphite" } } */
......@@ -45,4 +45,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be loop blocked" 3 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */
......@@ -54,4 +54,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 4 "graphite" } } */
......@@ -55,5 +55,4 @@ main (void)
return 0;
}
/* PRE destroys the perfect nest and we can't cope with that yet. */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 6 "graphite" } } */
......@@ -49,6 +49,4 @@ main (void)
return 0;
}
/* PRE destroys the perfect nest and we can't cope with that yet. */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -45,4 +45,4 @@ main (void)
return 0;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } } */
......@@ -59,6 +59,4 @@ main (void)
return 0;
}
/* PRE destroys the perfect nest and we can't cope with that yet. */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "tiled by" 3 "graphite" } } */
......@@ -38,9 +38,9 @@ set save-dg-do-what-default ${dg-do-what-default}
dg-init
set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ]
set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.\[fF\]{,90,95,03,08} ] ]
set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.\[fF\]{,90,95,03,08} ] ]
set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.\[fF\]{,90,95,03,08} ] ]
set opt_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.\[fF\]{,90,95,03,08} \
$srcdir/$subdir/block-*.\[fF\]{,90,95,03,08} ] ]
set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.\[fF\]{,90,95,03,08} ] ]
set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.\[fF\]{,90,95,03,08} ] ]
set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ] ]
......@@ -49,8 +49,7 @@ set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90
set dg-do-what-default compile
gfortran-dg-runtest $scop_files "" "-O2 -fgraphite -fdump-tree-graphite-all"
gfortran-dg-runtest $id_files "" "-O2 -fgraphite-identity -ffast-math"
gfortran-dg-runtest $interchange_files "" "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
gfortran-dg-runtest $block_files "" "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
gfortran-dg-runtest $opt_files "" "-O2 -floop-nest-optimize -ffast-math -fdump-tree-graphite-all"
# Vectorizer tests, to be run or compiled, depending on target capabilities.
if [check_vect_support_and_set_flags] {
......@@ -63,9 +62,8 @@ gfortran-dg-runtest $run_id_files "" "-O2 -fgraphite-identity"
# The default action for the rest of the files is 'compile'.
set dg-do-what-default compile
foreach f $block_files {lremove wait_to_run_files $f}
foreach f $id_files {lremove wait_to_run_files $f}
foreach f $interchange_files {lremove wait_to_run_files $f}
foreach f $opt_files {lremove wait_to_run_files $f}
foreach f $scop_files {lremove wait_to_run_files $f}
foreach f $run_id_files {lremove wait_to_run_files $f}
foreach f $vect_files {lremove wait_to_run_files $f}
......
......@@ -24,4 +24,4 @@ Program FOO
end Program FOO
! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } }
! { dg-final { scan-tree-dump-times "tiled by" 2 "graphite" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment