invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3

* 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
This commit is contained in:
Jan Hubicka 2008-08-29 13:39:04 +02:00 committed by Jan Hubicka
parent c6f7cfc15e
commit fcbe056b11
3 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,10 @@
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):

View 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

View 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);