From ea99e0becf7057b7112a267b55e39e9b8c24db13 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 11 Jan 2006 14:13:37 +0100 Subject: cgraph.c (cgraph_insert_node_to_hashtable): New function. * cgraph.c (cgraph_insert_node_to_hashtable): New function. * cgraph.h (cgraph_node): Add inline_decl. (cgraph_insert_node_to_hashtable): Declare. (save_inline_function_body): Declare. * cgraphunit.c (verify_cgraph_node): Inline edges might point to inline clones. (cgraph_preserve_function_body_p): Do not presrve when dump is enabled. (cgraph_function_versioning): Update call of tree_function_versioning. (save_inline_function_body): New function. * function.h (struct function): Kill saved_eh, saved_cfg, saved_args, saved_static_chain_decl, saved_blocks and saved-unexpanded_var_list. * ipa-inline.c (cgraph_mark_inline_edge): Look for inline clones. (cgraph_default_inline_p): Likewise. (cgraph_decide_inlining_incrementally): Likewise. * tree-inline.c (inline_data): Kill saving_p add update_clones_p. (copy_bb): Kill saving; do updating of clones. (copy_cfg_body): Kill saving. (initialize_inlined-parameters): Likewise. (expand_call_inline): Likewise. (save_body): Kill. (tree_function_versioning): New parameter "update_clones". (inlining_p): Kill saving. * tree-inline.h (tree_function_versioning): Update prototype. * tree-optimize.c (tree_rest_of_compilation): Use clonning instead of saving. From-SVN: r109580 --- gcc/cgraph.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc/cgraph.c') diff --git a/gcc/cgraph.c b/gcc/cgraph.c index ab45f04..88cf8ac 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -214,6 +214,19 @@ cgraph_node (tree decl) return node; } +/* Insert already constructed node into hashtable. */ + +void +cgraph_insert_node_to_hashtable (struct cgraph_node *node) +{ + struct cgraph_node **slot; + + slot = (struct cgraph_node **) htab_find_slot (cgraph_hash, node, INSERT); + + gcc_assert (!*slot); + *slot = node; +} + /* Compare ASMNAME with the DECL_ASSEMBLER_NAME of DECL. */ static bool -- cgit v1.1