aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMircea Namolaru <mircea.namolaru@inria.fr>2014-11-17 23:59:07 +0100
committerMircea Namolaru <mircea@gcc.gnu.org>2014-11-17 22:59:07 +0000
commit46cdd0c8cd8cb595fd3bac820d05e06072e858ed (patch)
treef9c6e2277ba485f304e2cbb5382a7d770ed56beb /gcc
parentd6f1bcb23dc5edba2f4035829a9055645d4c21a0 (diff)
downloadgcc-46cdd0c8cd8cb595fd3bac820d05e06072e858ed.zip
gcc-46cdd0c8cd8cb595fd3bac820d05e06072e858ed.tar.gz
gcc-46cdd0c8cd8cb595fd3bac820d05e06072e858ed.tar.bz2
Support for unroll and jam optimization.
From-SVN: r217682
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/doc/invoke.texi18
-rw-r--r--gcc/graphite-optimize-isl.c19
3 files changed, 37 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d936a92..a04b10a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2014-11-17 Mircea Namolaru <mircea.namolaru@inria.fr>
+
+ * doc/invoke.texi (floop-unroll-and-jam): Document
+ (loop-unroll-jam-size): Likewise.
+ (loop-unroll-jam-depth): Likewise.
+ * graphite-optimize-isl.c (getPrevectorMap_full): Modify comment.
+ (getScheduleForBandList): Replaced unsafe union_map reuse.
+
2014-11-17 Andrew Pinski <apinski@cavium.com>
* config/aarch64/thunderx.md: Remove copyright which should not
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9846a73..89edddb 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -391,7 +391,8 @@ Objective-C and Objective-C++ Dialects}.
-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
-fisolate-erroneous-paths-dereference -fisolate-erroneous-paths-attribute @gol
-fivopts -fkeep-inline-functions -fkeep-static-consts -flive-range-shrinkage @gol
--floop-block -floop-interchange -floop-strip-mine -floop-nest-optimize @gol
+-floop-block -floop-interchange -floop-strip-mine @gol
+-floop-unroll-and-jam -floop-nest-optimize @gol
-floop-parallelize-all -flra-remat -flto -flto-compression-level @gol
-flto-partition=@var{alg} -flto-report -flto-report-wpa -fmerge-all-constants @gol
-fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol
@@ -8352,6 +8353,13 @@ 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
+Enable unroll and jam for the ISL based loop nest optimizer. The unroll
+factor can be changed using the @option{loop-unroll-jam-size} parameter.
+The unrolled dimension (counting from the most inner one) can be changed
+using the @option{loop-unroll-jam-depth} parameter. .
+
@item -floop-parallelize-all
@opindex floop-parallelize-all
Use the Graphite data dependence analysis to identify loops that can
@@ -10469,6 +10477,14 @@ loop in the loop nest by a given number of iterations. The strip
length can be changed using the @option{loop-block-tile-size}
parameter. The default value is 51 iterations.
+@item loop-unroll-jam-size
+Specify the unroll factor for the @option{-floop-unroll-and-jam}. The
+default value is 4.
+
+@item loop-unroll-jam-depth
+Specify the dimension to be unrolled (counting from the most inner loop)
+for the @option{-floop-unroll-and-jam}. The default value is 2.
+
@item ipa-cp-value-list-size
IPA-CP attempts to track all possible values and types passed to a function's
parameter in order to propagate them and perform devirtualization.
diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
index cbab820..195101a 100644
--- a/gcc/graphite-optimize-isl.c
+++ b/gcc/graphite-optimize-isl.c
@@ -320,7 +320,7 @@ getPrevectorMap (isl_ctx *ctx, int DimToVectorize,
ip >= 0
The image of this map is the separation class. The range of this map includes
- all the i that are multiple of 4 in the domain beside the greater one.
+ all the i multiple of 4 in the domain such as i + 3 is in the domain too.
*/
static isl_map *
@@ -486,20 +486,25 @@ getScheduleForBandList (isl_band_list *BandList, isl_union_map **map_sepcl)
}
}
}
- Schedule = isl_union_map_union (Schedule, PartialSchedule);
+ Schedule = isl_union_map_union (Schedule,
+ isl_union_map_copy(PartialSchedule));
isl_band_free (Band);
isl_space_free (Space);
if (!flag_loop_unroll_jam)
- continue;
+ {
+ isl_union_map_free (PartialSchedule);
+ continue;
+ }
if (PartialSchedule_f)
- *map_sepcl = isl_union_map_union (*map_sepcl,
- PartialSchedule_f);
+ {
+ *map_sepcl = isl_union_map_union (*map_sepcl, PartialSchedule_f);
+ isl_union_map_free (PartialSchedule);
+ }
else
- *map_sepcl = isl_union_map_union (*map_sepcl,
- isl_union_map_copy (PartialSchedule));
+ *map_sepcl = isl_union_map_union (*map_sepcl, PartialSchedule);
}
return Schedule;