diff options
author | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-12-01 04:19:50 +0000 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-12-01 04:19:50 +0000 |
commit | 45285060c31a9ddc5c95ec09d339ab9308354e6c (patch) | |
tree | 069ec75f6274d0a7f851d0da8918701cfca4c952 | |
parent | 6fa04359f8d9b1ea1d30dafe072b114bef9727a0 (diff) | |
download | gcc-45285060c31a9ddc5c95ec09d339ab9308354e6c.zip gcc-45285060c31a9ddc5c95ec09d339ab9308354e6c.tar.gz gcc-45285060c31a9ddc5c95ec09d339ab9308354e6c.tar.bz2 |
ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when inlining -fno-strict-aliasing into...
* ipa-inline-transform.c (inline_call): Drop -fstrict-aliasing when
inlining -fno-strict-aliasing into -fstrict-aliasing body.
From-SVN: r231095
-rw-r--r-- | gcc/ipa-inline-transform.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 18d1171..0adaff3 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -322,6 +322,21 @@ inline_call (struct cgraph_edge *e, bool update_original, if (DECL_FUNCTION_PERSONALITY (callee->decl)) DECL_FUNCTION_PERSONALITY (to->decl) = DECL_FUNCTION_PERSONALITY (callee->decl); + if (!opt_for_fn (callee->decl, flag_strict_aliasing) + && opt_for_fn (to->decl, flag_strict_aliasing)) + { + struct gcc_options opts = global_options; + + cl_optimization_restore (&opts, + TREE_OPTIMIZATION (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (to->decl))); + opts.x_flag_strict_aliasing = false; + if (dump_file) + fprintf (dump_file, "Dropping flag_strict_aliasing on %s:%i\n", + to->name (), to->order); + build_optimization_node (&opts); + DECL_FUNCTION_SPECIFIC_OPTIMIZATION (to->decl) + = build_optimization_node (&opts); + } /* If aliases are involved, redirect edge to the actual destination and possibly remove the aliases. */ |