aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-09-01 17:14:24 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-09-01 15:14:24 +0000
commitbbc9396b62a65e8ecc67bb2f8df870e2b5040ac7 (patch)
treea04f98f7e7873d1c147343271471b27491c59a96 /gcc/opts.c
parent0cea211ebd67d10e93649074d348d12df67c4d97 (diff)
downloadgcc-bbc9396b62a65e8ecc67bb2f8df870e2b5040ac7.zip
gcc-bbc9396b62a65e8ecc67bb2f8df870e2b5040ac7.tar.gz
gcc-bbc9396b62a65e8ecc67bb2f8df870e2b5040ac7.tar.bz2
common.opt (fdevirtualize-speculatively): New function.
* common.opt (fdevirtualize-speculatively): New function. * invoke.texi (fdevirtualize-speculatively): Document. * ipa-devirt.c: Include ipa-inline.h (likely_target_p): New function. (ipa_devirt): New function. (gate_ipa_devirt): New function. (pass_data_ipa_devirt): New static var. (pass_ipa_devirt): Likewise. (make_pass_ipa_devirt): New function. * opts.c (default_options): Add OPT_fdevirtualize_speculatively. (common_handle_option): Disable devirtualization when value range profiling is available. * passes.def (pass_ipa_devirt): Add. * timever.def (TV_IPA_DEVIRT): New timevar. * tree-pass.h (make_pass_ipa_devirt): From-SVN: r202145
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 133fe0f..6b6652d 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -479,6 +479,7 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_2_PLUS, OPT_ftree_switch_conversion, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_fipa_cp, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_fdevirtualize, NULL, 1 },
+ { OPT_LEVELS_2_PLUS, OPT_fdevirtualize_speculatively, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_fipa_sra, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_falign_loops, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_falign_jumps, NULL, 1 },
@@ -1665,6 +1666,11 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_vect_cost_model = value;
if (!opts_set->x_flag_tree_loop_distribute_patterns)
opts->x_flag_tree_loop_distribute_patterns = value;
+ /* Indirect call profiling should do all useful transformations
+ speculative devirutalization does. */
+ if (!opts_set->x_flag_devirtualize_speculatively
+ && opts->x_flag_value_profile_transformations)
+ opts->x_flag_devirtualize_speculatively = false;
break;
case OPT_fprofile_generate_: