This is the mail archive of the
mailing list for the GCC project.
Fix cgraph reading seen in Mozila LTO build
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Sun, 4 Jul 2010 15:31:22 +0200
- Subject: Fix cgraph reading seen in Mozila LTO build
mozilla build fails with streamer getting out of sync. This is because of input_edge
condition ignoring edges for preemted nodes. This is wrong, since then we get out of
sync reading bitpack and even if we fix that we get out of sync later reading jump functions.
The overall idea always has been to read everythign it and then throw away
stuff during merging. This patch and additional fix to lto-symtab lets me to
of unrelated bug elsewhere).
Bootstrapped/regtested x86_64-linux, OK?
* lto-cgrah.c (input_edge): Do not care about resolution decisions.
--- lto-cgraph.c (revision 161774)
+++ lto-cgraph.c (working copy)
@@ -1158,7 +1158,6 @@ input_edge (struct lto_input_block *ib,
unsigned int nest;
struct bitpack_d bp;
- enum ld_plugin_symbol_resolution caller_resolution;
int ecf_flags = 0;
caller = VEC_index (cgraph_node_ptr, nodes, lto_input_sleb128 (ib));
@@ -1183,13 +1182,6 @@ input_edge (struct lto_input_block *ib,
freq = (int) bp_unpack_value (&bp, HOST_BITS_PER_INT);
nest = (unsigned) bp_unpack_value (&bp, 30);
- /* If the caller was preempted, don't create the edge.
- ??? Should we ever have edges from a preempted caller? */
- caller_resolution = lto_symtab_get_resolution (caller->decl);
- if (caller_resolution == LDPR_PREEMPTED_REG
- || caller_resolution == LDPR_PREEMPTED_IR)
edge = cgraph_create_indirect_edge (caller, NULL, 0, count, freq, nest);