aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2015-02-17 21:25:56 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2015-02-17 13:25:56 -0800
commit3c99176a7f968bdb8b7a3225265246f643551c80 (patch)
treed04bf3e89fcf482728834b7a88ea6c6667b145fa /gcc/opts.c
parentd420206ea581d85273f6d05280e658d3fdab604e (diff)
downloadgcc-3c99176a7f968bdb8b7a3225265246f643551c80.zip
gcc-3c99176a7f968bdb8b7a3225265246f643551c80.tar.gz
gcc-3c99176a7f968bdb8b7a3225265246f643551c80.tar.bz2
Add -fipa-cp-alignment
This patch adds -fipa-cp-alignment to provide a way to enable/disable alignment discovery and propagation in IPA-CP. gcc/ * common.opt (fipa-cp-alignment): New. * ipa-cp.c (ipcp_store_alignment_results): Check flag_ipa_cp_alignment. * opts.c (default_options_table): Enable -fipa-cp-alignment for -O2. (enable_fdo_optimizations): Set x_flag_ipa_cp_alignment. * doc/invoke.texi: Document -fipa-cp-alignment. gcc/testsuite/ * gcc.dg/ipa/propalign-3.c: New test. From-SVN: r220773
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 4a1ed0e..39c190d 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -493,6 +493,7 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_2_PLUS, OPT_ftree_pre, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_ftree_switch_conversion, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_fipa_cp, NULL, 1 },
+ { OPT_LEVELS_2_PLUS, OPT_fipa_cp_alignment, 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 },
@@ -1330,6 +1331,9 @@ enable_fdo_optimizations (struct gcc_options *opts,
if (!opts_set->x_flag_ipa_cp_clone
&& value && opts->x_flag_ipa_cp)
opts->x_flag_ipa_cp_clone = value;
+ if (!opts_set->x_flag_ipa_cp_alignment
+ && value && opts->x_flag_ipa_cp)
+ opts->x_flag_ipa_cp_alignment = value;
if (!opts_set->x_flag_predictive_commoning)
opts->x_flag_predictive_commoning = value;
if (!opts_set->x_flag_unswitch_loops)