[2/2] Enable flag_tree_loop_distribute_memset_zero at -O3.

Submitted by Sebastian Pop on July 30, 2010, 8:40 p.m.

Details

Message ID 1280522440-27919-3-git-send-email-sebpop@gmail.com
State New
Headers show

Commit Message

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 hide | download patch | download mbox

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;