public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch to remove unused function in IRA
@ 2010-08-11 22:24 Vladimir Makarov
  0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2010-08-11 22:24 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

  As Jeff Law proposed, unused function from IRA has been removed.  The 
patch is obvious but it was still bootstrap tested.

2010-08-11  Vladimir Makarov <vmakarov@redhat.com>

     * ira-int.h (ira_remove_allocno_copy_from_list): Remove.

     * ira-build.c (ira_remove_allocno_copy_from_list): Remove.


[-- Attachment #2: remove_allocno_copy_from_list.patch --]
[-- Type: text/plain, Size: 2053 bytes --]

Index: ira-int.h
===================================================================
--- ira-int.h	(revision 163079)
+++ ira-int.h	(working copy)
@@ -957,7 +957,6 @@
 				   int, bool, rtx, ira_loop_tree_node_t);
 extern void ira_add_allocno_copy_to_list (ira_copy_t);
 extern void ira_swap_allocno_copy_ends_if_necessary (ira_copy_t);
-extern void ira_remove_allocno_copy_from_list (ira_copy_t);
 extern ira_copy_t ira_add_allocno_copy (ira_allocno_t, ira_allocno_t, int,
 					bool, rtx, ira_loop_tree_node_t);
 
Index: ira-build.c
===================================================================
--- ira-build.c	(revision 163079)
+++ ira-build.c	(working copy)
@@ -1224,48 +1224,6 @@
   ALLOCNO_COPIES (second) = cp;
 }
 
-/* Detach a copy CP from allocnos involved into the copy.  */
-void
-ira_remove_allocno_copy_from_list (ira_copy_t cp)
-{
-  ira_allocno_t first = cp->first, second = cp->second;
-  ira_copy_t prev, next;
-
-  next = cp->next_first_allocno_copy;
-  prev = cp->prev_first_allocno_copy;
-  if (prev == NULL)
-    ALLOCNO_COPIES (first) = next;
-  else if (prev->first == first)
-    prev->next_first_allocno_copy = next;
-  else
-    prev->next_second_allocno_copy = next;
-  if (next != NULL)
-    {
-      if (next->first == first)
-	next->prev_first_allocno_copy = prev;
-      else
-	next->prev_second_allocno_copy = prev;
-    }
-  cp->prev_first_allocno_copy = cp->next_first_allocno_copy = NULL;
-
-  next = cp->next_second_allocno_copy;
-  prev = cp->prev_second_allocno_copy;
-  if (prev == NULL)
-    ALLOCNO_COPIES (second) = next;
-  else if (prev->second == second)
-    prev->next_second_allocno_copy = next;
-  else
-    prev->next_first_allocno_copy = next;
-  if (next != NULL)
-    {
-      if (next->second == second)
-	next->prev_second_allocno_copy = prev;
-      else
-	next->prev_first_allocno_copy = prev;
-    }
-  cp->prev_second_allocno_copy = cp->next_second_allocno_copy = NULL;
-}
-
 /* Make a copy CP a canonical copy where number of the
    first allocno is less than the second one.  */
 void

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-11 22:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11 22:24 Patch to remove unused function in IRA Vladimir Makarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).