* cfg.c (free_edge): Break out from ....
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Oct 2001 22:24:16 +0000 (22:24 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Oct 2001 22:24:16 +0000 (22:24 +0000)
(remove_edge): ... here.
(clear_edges): Use free_edge.

* att.h (ASM_QUAD): Add comment.
* bsd.h, sco5.h, sun386.h (ASM_QUAD): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46297 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfg.c
gcc/config/i386/att.h
gcc/config/i386/bsd.h
gcc/config/i386/sco5.h
gcc/config/i386/sun386.h

index de74d35..cbf0c5d 100644 (file)
@@ -1,3 +1,12 @@
+Wed Oct 17 00:21:31 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * cfg.c (free_edge): Break out from ....
+       (remove_edge): ... here.
+       (clear_edges): Use free_edge.
+
+       * att.h (ASM_QUAD): Add comment.
+       * bsd.h, sco5.h, sun386.h (ASM_QUAD): Define.
+
 Wed Oct 17 00:01:02 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        * i386.c (split_ti): New function.
index d8d8c99..a720673 100644 (file)
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -117,6 +117,7 @@ struct basic_block_def entry_exit_blocks[2]
 };
 
 void debug_flow_info                   PARAMS ((void));
+static void free_edge                  PARAMS ((edge));
 \f
 /* Called once at intialization time.  */
 
@@ -142,23 +143,53 @@ init_flow ()
     }
 }
 \f
+/* Helper function for remove_edge and clear_edges.  Frees edge structure
+   without actually unlinking it from the pred/succ lists.  */
+
+static void
+free_edge (e)
+     edge e;
+{
+  n_edges--;
+  memset (e, 0, sizeof (*e));
+  e->succ_next = first_deleted_edge;
+  first_deleted_edge = e;
+}
+
 /* Free the memory associated with the edge structures.  */
 
 void
 clear_edges ()
 {
   int i;
+  edge e;
 
   for (i = 0; i < n_basic_blocks; ++i)
     {
       basic_block bb = BASIC_BLOCK (i);
+      edge e = bb->succ;
 
-      while (bb->succ)
-       remove_edge (bb->succ);
+      while (e)
+       {
+         edge next = e->succ_next;
+
+         free_edge (e);
+         e = next;
+       }
+      bb->succ = NULL;
+      bb->pred = NULL;
     }
 
-  while (ENTRY_BLOCK_PTR->succ)
-    remove_edge (ENTRY_BLOCK_PTR->succ);
+  e = ENTRY_BLOCK_PTR->succ;
+  while (e)
+    {
+      edge next = e->succ_next;
+
+      free_edge (e);
+      e = next;
+    }
+  EXIT_BLOCK_PTR->pred = NULL;
+  ENTRY_BLOCK_PTR->succ = NULL;
 
   if (n_edges)
     abort ();
@@ -335,10 +366,7 @@ remove_edge (e)
   else
     dest->pred = e->pred_next;
 
-  n_edges--;
-  memset (e, 0, sizeof (*e));
-  e->succ_next = first_deleted_edge;
-  first_deleted_edge = e;
+  free_edge (e);
 }
 
 /* Redirect an edge's successor from one block to another.  */
index 8f2a1eb..7e8f7b5 100644 (file)
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA.  */
 
 #define ASM_SHORT "\t.value\t"
 #define ASM_LONG "\t.long\t"
-#define ASM_QUAD "\t.quad\t"
+#define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
 
 /* How to output an ASCII string constant.  */
 
index 82b1411..cf1b35b 100644 (file)
@@ -43,6 +43,7 @@ Boston, MA 02111-1307, USA.  */
 #define ASM_BYTE_OP "\t.byte\t"
 #define ASM_SHORT "\t.word\t"
 #define ASM_LONG "\t.long\t"
+#define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
 
 /* Output at beginning of assembler file.
    ??? I am skeptical of this -- RMS.  */
index 56bc287..16d5fcf 100644 (file)
@@ -59,6 +59,9 @@ Boston, MA 02111-1307, USA.  */
 #undef ASM_LONG
 #define ASM_LONG                       "\t.long\t"
 
+#undef ASM_QUAD
+#define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
+
 #undef TYPE_ASM_OP
 #define TYPE_ASM_OP                    "\t.type\t"
 
index b28f20f..8cc7227 100644 (file)
@@ -36,6 +36,8 @@ Boston, MA 02111-1307, USA.  */
 #define ASM_BYTE_OP "\t.byte\t"
 #define ASM_SHORT "\t.value\t"
 #define ASM_LONG "\t.long\t"
+#define ASM_QUAD "\t.quad\t"  /* Should not be used for 32bit compilation.  */
+
 
 /* How to output an ASCII string constant.  */