Fix resolution streaming with incremental linking

Message ID
State New
Series Fix resolution streaming with incremental linking |

Commit Message

Jan Hubicka Nov. 25, 2022, 2:10 p.m. UTC
this patch fixes streaming of resolution info when flag_incremental_link
== INCREMENTAL_LINK_NOLTO.  Here we want to stream the info from WPA to
ltrans as usual.

Bootstrapped/regtested x86_64-linux, tested with kernel LTO builds.
Plan to commit it later today.


	* gcc/ (lto_output_node): Only drop resolution info when
	flag_incremental_link === INCREMENTAL_LINK_LTO.


diff --git a/gcc/ b/gcc/
index 350195d86db..ff7669d0c4b 100644
--- a/gcc/
+++ b/gcc/
@@ -563,7 +563,7 @@  lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
 		/* When doing incremental link, we will get new resolution
 		   info next time we process the file.  */
-		flag_incremental_link ? LDPR_UNKNOWN : node->resolution);
+		flag_incremental_link == INCREMENTAL_LINK_LTO ? LDPR_UNKNOWN : node->resolution);
   bp_pack_value (&bp, node->split_part, 1);
   streamer_write_bitpack (&bp);
   streamer_write_data_stream (ob->main_stream, section, strlen (section) + 1);