invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3
authorJan Hubicka <jh@suse.cz>
Fri, 29 Aug 2008 11:39:04 +0000 (13:39 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 29 Aug 2008 11:39:04 +0000 (11:39 +0000)
* doc/invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3
(-fipa-cp-clone): Enabled by default at -O3.
* opts.c (decode_options): Enable ipa-cp at -O2, ipa-cp-clone at -O3;
make ipa-cp-clone to imply ipa-cp; disable cloning at -Os.

From-SVN: r139762

gcc/ChangeLog
gcc/doc/invoke.texi
gcc/opts.c

index c85ac79..3b80285 100644 (file)
@@ -1,5 +1,12 @@
 2008-08-29  Jan Hubicka  <jh@suse.cz>
 
+       * doc/invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3
+       (-fipa-cp-clone): Enabled by default at -O3.
+       * opts.c (decode_options): Enable ipa-cp at -O2, ipa-cp-clone at -O3;
+       make ipa-cp-clone to imply ipa-cp; disable cloning at -Os.
+
+2008-08-29  Jan Hubicka  <jh@suse.cz>
+
        * tree.c (build_function_type_skip_args, build_function_decl_skip_args):
        New functions.
        * tree.h (build_function_type_skip_args, build_function_decl_skip_args):
index e1e6969..e36bbb9 100644 (file)
@@ -5902,6 +5902,7 @@ This optimization analyzes the program to determine when values passed
 to functions are constants and then optimizes accordingly.  
 This optimization can substantially increase performance
 if the application has constants passed to functions.
+This flag is enabled by default at @option{-O2}, @option{-Os} and @option{-O3}.
 
 @item -fipa-cp-clone
 @opindex fipa-cp-clone
@@ -5911,6 +5912,7 @@ when externally visible function can be called with constant arguments.
 Because this optimization can create multiple copies of functions,
 it may significantly increase code size
 (see @option{--param ipcp-unit-growth=@var{value}}).
+This flag is enabled by default at @option{-O3}.
 
 @item -fipa-matrix-reorg
 @opindex fipa-matrix-reorg
index 8c46dfa..f64d747 100644 (file)
@@ -955,7 +955,8 @@ decode_options (unsigned int argc, const char **argv)
   flag_tree_vrp = opt2;
   flag_tree_builtin_call_dce = opt2;
   flag_tree_pre = opt2;
-      flag_tree_switch_conversion = 1;
+  flag_tree_switch_conversion = 1;
+  flag_ipa_cp = opt2;
 
       /* Allow more virtual operators to increase alias precision.  */
 
@@ -973,6 +974,9 @@ decode_options (unsigned int argc, const char **argv)
   flag_unswitch_loops = opt3;
   flag_gcse_after_reload = opt3;
   flag_tree_vectorize = opt3;
+  flag_ipa_cp_clone = opt3;
+  if (flag_ipa_cp_clone)
+    flag_ipa_cp = 1;
 
   /* Allow even more virtual operators.  Max-aliased-vops was set above for
      -O2, so don't reset it unless we are at -O3.  */
@@ -1028,6 +1032,9 @@ decode_options (unsigned int argc, const char **argv)
 
       /* We want to crossjump as much as possible.  */
       set_param_value ("min-crossjump-insns", 1);
+
+      /* Do not perform clonning in ipcp.  */
+      flag_ipa_cp_clone = 0;
     }
   else
     set_param_value ("min-crossjump-insns", initial_min_crossjump_insns);