Commit b60cc080 by Tobias Grosser Committed by Richard Biener

Makefile.in (OBJS): Add graphite-optimize-isl.o.

2012-07-04  Tobias Grosser <tobias@grosser.es>
	Michael Matz  <matz@suse.de>

	* Makefile.in (OBJS): Add graphite-optimize-isl.o.
	(graphite-optimize-isl.o): Add dependencies.
	* common.opt (floop-nest-optimize): New flag.
	* doc/invoke.texi (floop-nest-optimize): Document.
	* graphite-dependences.c (compute_deps): Export.
	* graphite-poly.h (compute_deps): Declare.
	* graphite-optimize-isl.c: New file.
	* graphite-poly.c (apply_poly_transforms): Run the loop
	nest optimizer.
	* tree-ssa-loop.c (gate_graphite_transforms): Enable graphite
	if -floop-nest-optimize is enabled.

Co-Authored-By: Michael Matz <matz@suse.de>

From-SVN: r189249
parent 9a9eca46
2012-07-04 Tobias Grosser <tobias@grosser.es>
Michael Matz <matz@suse.de>
* Makefile.in (OBJS): Add graphite-optimize-isl.o.
(graphite-optimize-isl.o): Add dependencies.
* common.opt (floop-nest-optimize): New flag.
* doc/invoke.texi (floop-nest-optimize): Document.
* graphite-dependences.c (compute_deps): Export.
* graphite-poly.h (compute_deps): Declare.
* graphite-optimize-isl.c: New file.
* graphite-poly.c (apply_poly_transforms): Run the loop
nest optimizer.
* tree-ssa-loop.c (gate_graphite_transforms): Enable graphite
if -floop-nest-optimize is enabled.
2012-07-03 Oleg Endo <olegendo@gcc.gnu.org>
* config/sh/predicates.md (logical_and_operand): New predicate.
......
......@@ -1248,6 +1248,7 @@ OBJS = \
graphite-clast-to-gimple.o \
graphite-dependences.o \
graphite-interchange.o \
graphite-optimize-isl.o \
graphite-poly.o \
graphite-scop-detection.o \
graphite-sese-to-poly.o \
......@@ -2560,6 +2561,9 @@ graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \
$(TREE_DATA_REF_H) domwalk.h sese.h graphite-poly.h \
graphite-sese-to-poly.h
graphite-optimize-isl.o : graphite-optimize-isl.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(SCEV_H) \
$(TREE_DUMP_H) sese.h graphite-poly.h
tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) \
$(TREE_DUMP_H) $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) $(OPTABS_H) \
......
......@@ -1219,6 +1219,10 @@ floop-flatten
Common Ignore
Does nothing. Preserved for backward compatibility.
floop-nest-optimize
Common Report Var(flag_loop_optimize_isl) Optimization
Enable the ISL based loop nest optimizer
fstrict-volatile-bitfields
Common Report Var(flag_strict_volatile_bitfields) Init(-1)
Force bitfield accesses to match their type width
......
......@@ -373,7 +373,7 @@ Objective-C and Objective-C++ Dialects}.
-fira-loop-pressure -fno-ira-share-save-slots @gol
-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
-fivopts -fkeep-inline-functions -fkeep-static-consts @gol
-floop-block -floop-interchange -floop-strip-mine @gol
-floop-block -floop-interchange -floop-strip-mine -floop-nest-optimize @gol
-floop-parallelize-all -flto -flto-compression-level @gol
-flto-partition=@var{alg} -flto-report -fmerge-all-constants @gol
-fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol
......@@ -7367,6 +7367,13 @@ GIMPLE -> GRAPHITE -> GIMPLE transformation. Some minimal optimizations
are also performed by the code generator CLooG, like index splitting and
dead code elimination in loops.
@item -floop-nest-optimize
@opindex floop-nest-optimize
Enable the ISL based loop nest optimizer. This is a generic loop nest
optimizer based on the Pluto optimization algorithms. It calculates a loop
structure optimized for data-locality and parallelism. This option
is experimental.
@item -floop-parallelize-all
@opindex floop-parallelize-all
Use the Graphite data dependence analysis to identify loops that can
......
......@@ -443,7 +443,7 @@ subtract_commutative_associative_deps (scop_p scop,
/* Compute the original data dependences in SCOP for all the reads and
writes in PBBS. */
static void
void
compute_deps (scop_p scop, VEC (poly_bb_p, heap) *pbbs,
isl_union_map **must_raw,
isl_union_map **may_raw,
......
......@@ -250,6 +250,11 @@ apply_poly_transforms (scop_p scop)
transform_done |= scop_do_interchange (scop);
}
/* This pass needs to be run at the final stage, as it does not
update the lst. */
if (flag_loop_optimize_isl)
transform_done |= optimize_isl (scop);
return transform_done;
}
......
......@@ -409,6 +409,7 @@ extern int scop_do_interchange (scop_p);
extern int scop_do_strip_mine (scop_p, int);
extern bool scop_do_block (scop_p);
extern bool flatten_all_loops (scop_p);
extern bool optimize_isl(scop_p);
extern void pbb_number_of_iterations_at_time (poly_bb_p, graphite_dim_t, mpz_t);
extern void debug_gmp_value (mpz_t);
......@@ -1549,4 +1550,20 @@ isl_map *reverse_loop_at_level (poly_bb_p, int);
isl_union_map *reverse_loop_for_pbbs (scop_p, VEC (poly_bb_p, heap) *, int);
__isl_give isl_union_map *extend_schedule (__isl_take isl_union_map *);
void
compute_deps (scop_p scop, VEC (poly_bb_p, heap) *pbbs,
isl_union_map **must_raw,
isl_union_map **may_raw,
isl_union_map **must_raw_no_source,
isl_union_map **may_raw_no_source,
isl_union_map **must_war,
isl_union_map **may_war,
isl_union_map **must_war_no_source,
isl_union_map **may_war_no_source,
isl_union_map **must_waw,
isl_union_map **may_waw,
isl_union_map **must_waw_no_source,
isl_union_map **may_waw_no_source);
#endif
......@@ -265,7 +265,8 @@ gate_graphite_transforms (void)
|| flag_loop_interchange
|| flag_loop_strip_mine
|| flag_graphite_identity
|| flag_loop_parallelize_all)
|| flag_loop_parallelize_all
|| flag_loop_optimize_isl)
flag_graphite = 1;
return flag_graphite != 0;
......
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