+2014-12-04 David Malcolm <dmalcolm@redhat.com>
+
+ PR jit/63854
+ * ipa-prop.c (ipa_register_cgraph_hooks): Guard insertion of
+ ipa_add_new_function on function_insertion_hook_holder being
+ non-NULL.
+ * ipa-reference.c (ipa_reference_c_finalize): Remove
+ node_removal_hook_holder and node_duplication_hook_holder if
+ they've been added to symtab.
+ * toplev.c (toplev::finalize): Call ipa_reference_c_finalize
+ before cgraph_c_finalize so that the former can access "symtab".
+
2014-12-04 David Malcolm <dmalcolm@redhat.com>
* doc/cfg.texi (GIMPLE statement iterators): Add note about
if (!node_duplication_hook_holder)
node_duplication_hook_holder =
symtab->add_cgraph_duplication_hook (&ipa_node_duplication_hook, NULL);
- function_insertion_hook_holder =
+ if (!function_insertion_hook_holder)
+ function_insertion_hook_holder =
symtab->add_cgraph_insertion_hook (&ipa_add_new_function, NULL);
}
bitmap_obstack_release (&optimization_summary_obstack);
ipa_init_p = false;
}
+
+ if (node_removal_hook_holder)
+ {
+ symtab->remove_cgraph_removal_hook (node_removal_hook_holder);
+ node_removal_hook_holder = NULL;
+ }
+ if (node_duplication_hook_holder)
+ {
+ symtab->remove_cgraph_duplication_hook (node_duplication_hook_holder);
+ node_duplication_hook_holder = NULL;
+ }
}
rtl_initialized = false;
this_target_rtl->target_specific_initialized = false;
+ /* Needs to be called before cgraph_c_finalize since it uses symtab. */
+ ipa_reference_c_finalize ();
+
cgraph_c_finalize ();
cgraphunit_c_finalize ();
dwarf2out_c_finalize ();
gcse_c_finalize ();
ipa_cp_c_finalize ();
- ipa_reference_c_finalize ();
ira_costs_c_finalize ();
params_c_finalize ();