summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-17 21:25:56 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-17 21:25:56 +0000
commit7715e0c8c5610e9c57062cd14097049b0736d71f (patch)
treed04bf3e89fcf482728834b7a88ea6c6667b145fa /gcc/ipa-cp.c
parentfdee3e8a78f2a903f46b21b2547b028adf3f576a (diff)
downloadgcc-7715e0c8c5610e9c57062cd14097049b0736d71f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 440ced4900c..103ac99a6f2 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -4323,6 +4323,15 @@ ipcp_store_alignment_results (void)
bool dumped_sth = false;
bool found_useful_result = false;
+ if (!opt_for_fn (node->decl, flag_ipa_cp_alignment))
+ {
+ if (dump_file)
+ fprintf (dump_file, "Not considering %s for alignment discovery "
+ "and propagate; -fipa-cp-alignment: disabled.\n",
+ node->name ());
+ continue;
+ }
+
if (info->ipcp_orig_node)
info = IPA_NODE_REF (info->ipcp_orig_node);