summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/cfg.c44
-rw-r--r--gcc/config/i386/att.h2
-rw-r--r--gcc/config/i386/bsd.h1
-rw-r--r--gcc/config/i386/sco5.h3
-rw-r--r--gcc/config/i386/sun386.h2
6 files changed, 52 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index de74d35399e..cbf0c5d07ae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cfg.c b/gcc/cfg.c
index d8d8c992b7d..a72067342f2 100644
--- 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));
/* Called once at intialization time. */
@@ -142,23 +143,53 @@ init_flow ()
}
}
+/* 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. */
diff --git a/gcc/config/i386/att.h b/gcc/config/i386/att.h
index 8f2a1ebb50d..7e8f7b57c5f 100644
--- a/gcc/config/i386/att.h
+++ b/gcc/config/i386/att.h
@@ -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. */
diff --git a/gcc/config/i386/bsd.h b/gcc/config/i386/bsd.h
index 82b141130f9..cf1b35b65d9 100644
--- a/gcc/config/i386/bsd.h
+++ b/gcc/config/i386/bsd.h
@@ -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. */
diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h
index 56bc2879e6c..16d5fcf2a45 100644
--- a/gcc/config/i386/sco5.h
+++ b/gcc/config/i386/sco5.h
@@ -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"
diff --git a/gcc/config/i386/sun386.h b/gcc/config/i386/sun386.h
index b28f20fd01a..8cc722710eb 100644
--- a/gcc/config/i386/sun386.h
+++ b/gcc/config/i386/sun386.h
@@ -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. */