From: Jan Hubicka Date: Sat, 28 Mar 2009 11:00:07 +0000 (+0100) Subject: cgraph.c (cgraph_node, [...]): Remove master clone handling. X-Git-Tag: releases/gcc-4.5.0~7099 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=144e8aac3db919da759194f93628b91377afc4eb;p=thirdparty%2Fgcc.git cgraph.c (cgraph_node, [...]): Remove master clone handling. * 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. From-SVN: r145175 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce250d55bb08..b700ee7fb787 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2009-03-28 Jan Hubicka + + * 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 * cgraph.c (cgraph_function_body_availability): Functions declared diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 38de8e490d78..fa9ac3d427c0 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 29fc1ba4a4d8..7f2cc7a0d4fe 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 48d95049b4f3..7349f6b8478b 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 32e25a2455ee..92d68d202fe8 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;