From: Jan Hubicka Date: Fri, 13 Nov 2020 20:15:40 +0000 (+0100) Subject: Fix modref insertion hook. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a90e99fa2f2423a195301adca060dccc3d0755e;p=gcc.git Fix modref insertion hook. * ipa-modref.c (modref_summaries::insert, modref_summaries_lto::insert): Remove summary if ipa-modref is disabled. --- diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c index 3f46bebed3c..a9797b26b8d 100644 --- a/gcc/ipa-modref.c +++ b/gcc/ipa-modref.c @@ -1273,7 +1273,8 @@ modref_summaries::insert (struct cgraph_node *node, modref_summary *) optimization_summaries->remove (node); return; } - if (!DECL_STRUCT_FUNCTION (node->decl)) + if (!DECL_STRUCT_FUNCTION (node->decl) + || !opt_for_fn (node->decl, flag_ipa_modref)) { summaries->remove (node); return; @@ -1292,6 +1293,7 @@ modref_summaries_lto::insert (struct cgraph_node *node, modref_summary_lto *) propagated. This is done only by SIMD cloning that is not very critical. */ if (!DECL_STRUCT_FUNCTION (node->decl) + || !opt_for_fn (node->decl, flag_ipa_modref) || propagated) { summaries_lto->remove (node);