aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-11-04 16:51:18 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2012-11-04 15:51:18 +0000
commitf56f2d332c6f78342a8f52ab426c38806d772017 (patch)
treed8ee6e98d96c8a04aa08085cf3934280834cfdf7 /gcc
parentda04ea110d6950f1f5e62f309dd175c770d969ba (diff)
downloadgcc-f56f2d332c6f78342a8f52ab426c38806d772017.zip
gcc-f56f2d332c6f78342a8f52ab426c38806d772017.tar.gz
gcc-f56f2d332c6f78342a8f52ab426c38806d772017.tar.bz2
invoke.texi (profile-use): update documentation.
* invoke.texi (profile-use): update documentation. * opts.c (common_handle_option): Enable tree-vectorize and tree-loop-distribute-patterns. * tree-loop-distribution.c (tree_loop_distribution): Skip loops optimized for size. * config/i386/i386.c (ix86_option_override_internal): Enabe prefetch_lop_arrays for profile-use. From-SVN: r193135
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/doc/invoke.texi3
-rw-r--r--gcc/opts.c6
-rw-r--r--gcc/tree-loop-distribution.c4
5 files changed, 23 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b2b4394..6367ac5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2012-11-03 Jan Hubicka <jh@suse.cz>
+
+ * invoke.texi (profile-use): update documentation.
+ * opts.c (common_handle_option): Enable tree-vectorize
+ and tree-loop-distribute-patterns.
+ * tree-loop-distribution.c (tree_loop_distribution): Skip loops
+ optimized for size.
+ * config/i386/i386.c (ix86_option_override_internal): Enabe
+ prefetch_lop_arrays for profile-use.
+
2012-11-03 Robert Mason <rbmj@verizon.net>
* gcov-io.c (gcov_open): Add file mode to open call (need for VxWorks)
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index fae300e..833ef5c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3950,7 +3950,7 @@ ix86_option_override_internal (bool main_args_p)
/* Enable sw prefetching at -O3 for CPUS that prefetching is helpful. */
if (flag_prefetch_loop_arrays < 0
&& HAVE_prefetch
- && optimize >= 3
+ && (optimize >= 3 || flag_profile_use)
&& TARGET_SOFTWARE_PREFETCHING_BENEFICIAL)
flag_prefetch_loop_arrays = 1;
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ff0c87d..1338e6e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -8409,7 +8409,8 @@ Enable profile feedback directed optimizations, and optimizations
generally profitable only with profile feedback available.
The following options are enabled: @code{-fbranch-probabilities}, @code{-fvpt},
-@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}
+@code{-funroll-loops}, @code{-fpeel-loops}, @code{-ftracer}, @code{-ftree-vectorize},
+@code{ftree-loop-distribute-patterns}
By default, GCC emits an error message if the feedback profiles do not
match the source code. This error can be turned into a warning by using
diff --git a/gcc/opts.c b/gcc/opts.c
index a1cf2d5..3160b8c 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1587,6 +1587,12 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_unswitch_loops = value;
if (!opts_set->x_flag_gcse_after_reload)
opts->x_flag_gcse_after_reload = value;
+ if (!opts_set->x_flag_tree_vectorize)
+ opts->x_flag_tree_vectorize = value;
+ if (!opts_set->x_flag_vect_cost_model)
+ opts->x_flag_vect_cost_model = value;
+ if (!opts_set->x_flag_tree_loop_distribute_patterns)
+ opts->x_flag_tree_loop_distribute_patterns = value;
break;
case OPT_fprofile_generate_:
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 10bd29e..0ade107 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1511,6 +1511,10 @@ tree_loop_distribution (void)
if (!single_exit (loop))
continue;
+ /* Only optimize hot loops. */
+ if (!optimize_loop_for_speed_p (loop))
+ continue;
+
/* Only distribute loops with a header and latch for now. */
if (loop->num_nodes > 2)
continue;