cfg.c (free_edge): Break out from ....

* 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.

From-SVN: r46297
This commit is contained in:
Jan Hubicka 2001-10-17 00:24:16 +02:00 committed by Jan Hubicka
parent 44cf5b6a71
commit d39ac0fdc0
6 changed files with 52 additions and 9 deletions

View 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.

View File

@ -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. */

View 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. */

View 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. */

View 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"

View 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. */