diff mbox series

Fix optimization difference caused by -fdump-ipa-inline

Message ID 20211117004620.GA2685@kam.mff.cuni.cz
State New
Headers show
Series Fix optimization difference caused by -fdump-ipa-inline | expand

Commit Message

Jan Hubicka Nov. 17, 2021, 12:46 a.m. UTC
Hi,
This patch fixes a bug that caused some optimizations to be dropped with
-fdump-ipa-inline.

gcc/ChangeLog:

2021-11-17  Jan Hubicka  <hubicka@ucw.cz>

	PR ipa/103246
	* ipa-modref.c (ipa_merge_modref_summary_after_inlining): Fix clearing
	of to_info_lto
diff mbox series

Patch

diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
index a70575bc807..90cd1be764c 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);