Patchwork [2/2] Enable flag_tree_loop_distribute_memset_zero at -O3.

login
register
mail settings
Submitter Sebastian Pop
Date July 30, 2010, 8:40 p.m.
Message ID <1280522440-27919-3-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/60380/
State New
Headers show

Comments

Sebastian Pop - July 30, 2010, 8:40 p.m.
---
 gcc/doc/invoke.texi |    1 +
 gcc/opts.c          |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 2d61382..ca3238c 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -6944,6 +6944,7 @@  DO I = 1, N
 ENDDO
 @end smallexample
 and the initialization loop is transformed into a call to memset zero.
+This flag is enabled by default at @option{-O3}.
 
 @item -ftree-loop-im
 @opindex ftree-loop-im
diff --git a/gcc/opts.c b/gcc/opts.c
index 07d7a23..16a337c 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -862,6 +862,7 @@  decode_options (unsigned int argc, const char **argv,
 
   /* -O3 optimizations.  */
   opt3 = (optimize >= 3);
+  flag_tree_loop_distribute_memset_zero = opt3;
   flag_predictive_commoning = opt3;
   flag_inline_functions = opt3;
   flag_unswitch_loops = opt3;