From 8c693978dd64b16637577ebf50c760053d7d2165 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 17 Nov 2021 01:43:57 +0100 Subject: [PATCH] Fix clearing of to_info_lto in ipa_merge_modref_summary_after_inlining This patch fixes bug that caused some optimizations to be dropped with -fdump-ipa-inline. gcc/ChangeLog: 2021-11-17 Jan Hubicka PR ipa/103246 * ipa-modref.c (ipa_merge_modref_summary_after_inlining): Fix clearing of to_info_lto --- gcc/ipa-modref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c index a70575b..90cd1be 100644 --- a/gcc/ipa-modref.c +++ b/gcc/ipa-modref.c @@ -5123,6 +5123,7 @@ ipa_merge_modref_summary_after_inlining (cgraph_edge *edge) fprintf (dump_file, "Removed mod-ref summary for %s\n", to->dump_name ()); summaries_lto->remove (to); + to_info_lto = NULL; } else if (to_info_lto && dump_file) { @@ -5130,7 +5131,6 @@ ipa_merge_modref_summary_after_inlining (cgraph_edge *edge) fprintf (dump_file, "Updated mod-ref summary for %s\n", to->dump_name ()); to_info_lto->dump (dump_file); - to_info_lto = NULL; } if (callee_info_lto) summaries_lto->remove (edge->callee); -- 2.7.4