}
/* In case of type mismatches across units we can fail
to unify some types and thus not find a proper
- field-decl here. Just do nothing in this case. */
+ field-decl here. So only assert here if checking
+ is enabled. */
+#ifdef ENABLE_CHECKING
+ gcc_assert (tem != NULL_TREE);
+#endif
if (tem != NULL_TREE)
TREE_OPERAND (op, 1) = tem;
}
gimple *stmts;
basic_block bb;
struct bitpack_d *bp;
+ struct cgraph_node *node;
+ tree args, narg, oarg;
fn = DECL_STRUCT_FUNCTION (fn_decl);
tag = input_record_start (ib);
/* Read all the local symbols. */
fn->local_decls = lto_input_tree (ib, data_in);
+ /* Read all function arguments. We need to re-map them here to the
+ arguments of the merged function declaration. */
+ args = lto_input_tree (ib, data_in);
+ for (oarg = args, narg = DECL_ARGUMENTS (fn_decl);
+ oarg && narg;
+ oarg = TREE_CHAIN (oarg), narg = TREE_CHAIN (narg))
+ {
+ int ix;
+ bool res;
+ res = lto_streamer_cache_lookup (data_in->reader_cache, oarg, &ix);
+ gcc_assert (res);
+ /* Replace the argument in the streamer cache. */
+ lto_streamer_cache_insert_at (data_in->reader_cache, narg, ix);
+ }
+ gcc_assert (!oarg && !narg);
+
/* Read all the SSA names. */
input_ssa_names (ib, data_in, fn);
gcc_assert (DECL_INITIAL (fn_decl));
DECL_SAVED_TREE (fn_decl) = NULL_TREE;
- /* Read all function arguments. */
- DECL_ARGUMENTS (fn_decl) = lto_input_tree (ib, data_in);
-
/* Read all the basic blocks. */
tag = input_record_start (ib);
while (tag)
gimple_set_body (fn_decl, bb_seq (ei_edge (ei)->dest));
}
- fixup_call_stmt_edges (cgraph_node (fn_decl), stmts);
+ node = cgraph_node (fn_decl);
+ fixup_call_stmt_edges (node, stmts);
+ execute_all_ipa_stmt_fixups (node, stmts);
update_ssa (TODO_update_ssa_only_virtuals);
free_dominance_info (CDI_DOMINATORS);
/* Restore decl state */
file_data->current_decl_state = file_data->global_decl_state;
- /* FIXME: ipa_transforms_to_apply holds list of passes that have optimization
- summaries computed and needs to apply changes. At the moment WHOPR only
- supports inlining, so we can push it here by hand. In future we need to stream
- this field into ltrans compilation. This will also need to move the field
- from struct function into cgraph node where it belongs. */
- if (flag_ltrans && !cgraph_node (fn_decl)->global.inlined_to)
- VEC_safe_push (ipa_opt_pass, heap,
- cfun->ipa_transforms_to_apply,
- (ipa_opt_pass)&pass_ipa_inline);
pop_cfun ();
}
else
if (TREE_CODE (expr) == VAR_DECL
|| TREE_CODE (expr) == PARM_DECL)
DECL_HAS_VALUE_EXPR_P (expr) = (unsigned) bp_unpack_value (bp, 1);
+ DECL_RESTRICTED_P (expr) = (unsigned) bp_unpack_value (bp, 1);
}
}