This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto][patch] Remove unused arguments


2009-04-02  Rafael Avila de Espindola  <espindola@google.com>

	* cgraph.c (cgraph_is_master_clone): Remove check_overwrite.
	(cgraph_master_clone): Remove check_overwrite.
	* cgraph.h (cgraph_is_master_clone): Remove check_overwrite.
	(cgraph_master_clone): Remove check_overwrite.
	* ipa-pure-const.c(write_summary): Update calls to
	cgraph_is_master_clone.
	* ipa-reference.c (write_node_summary_p): Update call to
	cgraph_is_master_clone.
	* ipa-type-escape.c (type_escape_execute): Update call to
	cgraph_is_master_clone.
	* tree-ssa-structalias.c (ipa_pta_execute): Update calls
	cgraph_is_master_clone.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 18cb97b..61687ba 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1433,9 +1433,9 @@ cgraph_is_clone_node (struct cgraph_node *n)
 /* Return true if N is an master_clone, (see cgraph_master_clone).  */
 
 bool
-cgraph_is_master_clone (struct cgraph_node *n, bool check_overwrite)
+cgraph_is_master_clone (struct cgraph_node *n)
 {
-  return (n == cgraph_master_clone (n, check_overwrite));
+  return (n == cgraph_master_clone (n));
 }
 
 
@@ -1443,12 +1443,11 @@ cgraph_is_master_clone (struct cgraph_node *n, bool check_overwrite)
    CHECK_OVERWRITE is true, not overwritable.  */ 
 
 struct cgraph_node *
-cgraph_master_clone (struct cgraph_node *n, bool check_overwrite)
+cgraph_master_clone (struct cgraph_node *n)
 {
   enum availability avail = cgraph_function_body_availability (n);
 
-  if (avail == AVAIL_NOT_AVAILABLE || 
-      (check_overwrite && (avail == AVAIL_OVERWRITABLE)))
+  if (avail == AVAIL_NOT_AVAILABLE || avail == AVAIL_OVERWRITABLE)
     return NULL;
 
   if (!n->master_clone)
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index ed58e72..d74a490 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -408,8 +408,8 @@ void cgraph_unnest_node (struct cgraph_node *);
 
 enum availability cgraph_function_body_availability (struct cgraph_node *);
 bool cgraph_is_clone_node (struct cgraph_node *);
-bool cgraph_is_master_clone (struct cgraph_node *, bool);
-struct cgraph_node *cgraph_master_clone (struct cgraph_node *, bool);
+bool cgraph_is_master_clone (struct cgraph_node *);
+struct cgraph_node *cgraph_master_clone (struct cgraph_node *);
 void cgraph_add_new_function (tree, bool);
 
 cgraph_node_set cgraph_node_set_new (void);
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 36d7b2f..ad548cc 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -750,7 +750,7 @@ write_summary (cgraph_node_set set)
   for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi))
     {
       node = csi_node (csi);
-      if (node->analyzed && cgraph_is_master_clone (node, true)
+      if (node->analyzed && cgraph_is_master_clone (node)
 	  && get_function_state (node) != NULL)
 	count++;
     }
@@ -761,7 +761,7 @@ write_summary (cgraph_node_set set)
   for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi))
     {
       node = csi_node (csi);
-      if (node->analyzed && cgraph_is_master_clone (node, true)
+      if (node->analyzed && cgraph_is_master_clone (node)
 	  && get_function_state (node) != NULL)
 	{
 	  unsigned HOST_WIDEST_INT flags = 0;
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index 8ee8e54..b9c9929 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -1003,7 +1003,7 @@ write_node_summary_p (struct cgraph_node *node)
 {
   return (node->analyzed 
 	  && node->global.inlined_to == NULL
-	  && (cgraph_is_master_clone (node, true)
+	  && (cgraph_is_master_clone (node)
 	      || (cgraph_function_body_availability (node) 
 		  == AVAIL_OVERWRITABLE))
 	  && get_reference_vars_info (node) != NULL);
diff --git a/gcc/ipa-type-escape.c b/gcc/ipa-type-escape.c
index f4ae16d..48d9504 100644
--- a/gcc/ipa-type-escape.c
+++ b/gcc/ipa-type-escape.c
@@ -1988,7 +1988,7 @@ type_escape_execute (void)
   */
   for (node = cgraph_nodes; node; node = node->next)
     if (node->analyzed 
-	&& (cgraph_is_master_clone (node, true)
+	&& (cgraph_is_master_clone (node)
 	    || (cgraph_function_body_availability (node) == AVAIL_OVERWRITABLE)))
       analyze_function (node);
 
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index d618418..384fe18 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -5677,7 +5677,7 @@ ipa_pta_execute (void)
 
   for (node = cgraph_nodes; node; node = node->next)
     {
-      if (!node->analyzed || cgraph_is_master_clone (node, true))
+      if (!node->analyzed || cgraph_is_master_clone (node))
 	{
 	  unsigned int varid;
 
@@ -5693,7 +5693,7 @@ ipa_pta_execute (void)
     }
   for (node = cgraph_nodes; node; node = node->next)
     {
-      if (node->analyzed && cgraph_is_master_clone (node, true))
+      if (node->analyzed && cgraph_is_master_clone (node))
 	{
 	  struct function *func = DECL_STRUCT_FUNCTION (node->decl);
 	  basic_block bb;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]