diff options
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cgraph.c | 33 | ||||
-rw-r--r-- | gcc/cgraph.h | 5 | ||||
-rw-r--r-- | gcc/ipa-type-escape.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-structalias.c | 4 |
5 files changed, 13 insertions, 43 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce250d5..b700ee7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2009-03-28 Jan Hubicka <jh@suse.cz> + * cgraph.c (cgraph_node, cgraph_remove_node, dump_cgraph_node, + cgraph_clone_node): Remove master clone handling. + (cgraph_is_master_clone, cgraph_master_clone): Remove. + * cgraph.h (master_clone): Remove. + (cgraph_is_master_clone, cgraph_master_clone): Remove. + * ipa-type-escape.c (type_escape_execute): Remove use of master clone. + (tree-ssa-structalias.c (ipa_pta_execute): Likewise. + +2009-03-28 Jan Hubicka <jh@suse.cz> + * cgraph.c (cgraph_function_body_availability): Functions declared inline are always safe to assume that it is not going to be replaced. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 38de8e4..fa9ac3d 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -464,8 +464,6 @@ cgraph_node (tree decl) if (*slot) { node = *slot; - if (!node->master_clone) - node->master_clone = node; return node; } @@ -477,7 +475,6 @@ cgraph_node (tree decl) node->origin = cgraph_node (DECL_CONTEXT (decl)); node->next_nested = node->origin->nested; node->origin->nested = node; - node->master_clone = node; } if (assembler_name_hash) { @@ -985,11 +982,6 @@ cgraph_remove_node (struct cgraph_node *node) if (node->next_clone) { struct cgraph_node *new_node = node->next_clone; - struct cgraph_node *n; - - /* Make the next clone be the master clone */ - for (n = new_node; n; n = n->next_clone) - n->master_clone = new_node; *slot = new_node; node->next_clone->prev_clone = NULL; @@ -1139,8 +1131,6 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node) if (cgraph_function_flags_ready) fprintf (f, " availability:%s", cgraph_availability_names [cgraph_function_body_availability (node)]); - if (node->master_clone && node->master_clone->uid != node->uid) - fprintf (f, "(%i)", node->master_clone->uid); if (node->count) fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x", (HOST_WIDEST_INT)node->count); @@ -1349,7 +1339,6 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq, new_node->local = n->local; new_node->global = n->global; new_node->rtl = n->rtl; - new_node->master_clone = n->master_clone; new_node->count = count; if (n->count) { @@ -1381,28 +1370,6 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq, return new_node; } -/* Return true if N is an master_clone, (see cgraph_master_clone). */ - -bool -cgraph_is_master_clone (struct cgraph_node *n) -{ - return (n == cgraph_master_clone (n)); -} - -struct cgraph_node * -cgraph_master_clone (struct cgraph_node *n) -{ - enum availability avail = cgraph_function_body_availability (n); - - if (avail == AVAIL_NOT_AVAILABLE || avail == AVAIL_OVERWRITABLE) - return NULL; - - if (!n->master_clone) - n->master_clone = cgraph_node (n->decl); - - return n->master_clone; -} - /* NODE is no longer nested function; update cgraph accordingly. */ void cgraph_unnest_node (struct cgraph_node *node) diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 29fc1ba..7f2cc7a 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -143,9 +143,6 @@ struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) /* Pointer to the next clone. */ struct cgraph_node *next_clone; struct cgraph_node *prev_clone; - /* Pointer to a single unique cgraph node for this function. If the - function is to be output, this is the copy that will survive. */ - struct cgraph_node *master_clone; /* For functions with many calls sites it holds map from call expression to the edge to speed up cgraph_edge function. */ htab_t GTY((param_is (struct cgraph_edge))) call_site_hash; @@ -334,8 +331,6 @@ bool cgraph_function_possibly_inlined_p (tree); void cgraph_unnest_node (struct cgraph_node *); enum availability cgraph_function_body_availability (struct cgraph_node *); -bool cgraph_is_master_clone (struct cgraph_node *); -struct cgraph_node *cgraph_master_clone (struct cgraph_node *); void cgraph_add_new_function (tree, bool); /* In cgraphunit.c */ diff --git a/gcc/ipa-type-escape.c b/gcc/ipa-type-escape.c index 48d9504..7349f6b 100644 --- a/gcc/ipa-type-escape.c +++ b/gcc/ipa-type-escape.c @@ -1987,9 +1987,7 @@ type_escape_execute (void) they may cause a type variable to escape. */ for (node = cgraph_nodes; node; node = node->next) - if (node->analyzed - && (cgraph_is_master_clone (node) - || (cgraph_function_body_availability (node) == AVAIL_OVERWRITABLE))) + if (node->analyzed) analyze_function (node); diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 32e25a2..92d68d20 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -5669,7 +5669,7 @@ ipa_pta_execute (void) for (node = cgraph_nodes; node; node = node->next) { - if (!node->analyzed || cgraph_is_master_clone (node)) + if (!node->analyzed) { unsigned int varid; @@ -5685,7 +5685,7 @@ ipa_pta_execute (void) } for (node = cgraph_nodes; node; node = node->next) { - if (node->analyzed && cgraph_is_master_clone (node)) + if (node->analyzed) { struct function *func = DECL_STRUCT_FUNCTION (node->decl); basic_block bb; |