diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 07:49:34 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 07:49:34 +0000 |
commit | 82f7392b2d438610b8c96fa4025129d0d15171f2 (patch) | |
tree | 217b3b458beea6cff0af2f1de2339e47d5bc476d /gcc/cfg.c | |
parent | 1eb054eaa43b5a80b0ef917a2c87296e1273f6d1 (diff) | |
download | gcc-82f7392b2d438610b8c96fa4025129d0d15171f2.tar.gz |
* cfg.c (clear_aux_for_blocks): Split out of ...
(free_aux_for_blocks): here.
(clear_aux_for_edges): Split from ...
(free_aux_for_edges): here.
* basic-block.h: Declare them.
* lcm.c (compute_antinout_edge): Use them.
(compute_laterin, compute_available, compute_nearerout): Likewise.
(optimize_mode_switching): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfg.c')
-rw-r--r-- | gcc/cfg.c | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/gcc/cfg.c b/gcc/cfg.c index a72067342f2..e767732becf 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -618,22 +618,31 @@ alloc_aux_for_blocks (size) } } -/* Free data allocated in block_aux_obstack and clear AUX pointers - of all blocks. */ +/* Clear AUX pointers of all blocks. */ void -free_aux_for_blocks () +clear_aux_for_blocks () { int i; - if (!first_block_aux_obj) - abort (); - obstack_free (&block_aux_obstack, first_block_aux_obj); for (i = 0; i < n_basic_blocks; i++) BASIC_BLOCK (i)->aux = NULL; ENTRY_BLOCK_PTR->aux = NULL; EXIT_BLOCK_PTR->aux = NULL; +} + +/* Free data allocated in block_aux_obstack and clear AUX pointers + of all blocks. */ + +void +free_aux_for_blocks () +{ + if (!first_block_aux_obj) + abort (); + obstack_free (&block_aux_obstack, first_block_aux_obj); first_block_aux_obj = NULL; + + clear_aux_for_blocks (); } /* Allocate an memory edge of SIZE as BB->aux. The obstack must @@ -687,17 +696,13 @@ alloc_aux_for_edges (size) } } -/* Free data allocated in edge_aux_obstack and clear AUX pointers - of all edges. */ +/* Clear AUX pointers of all edges. */ void -free_aux_for_edges () +clear_aux_for_edges () { int i; - if (!first_edge_aux_obj) - abort (); - obstack_free (&edge_aux_obstack, first_edge_aux_obj); for (i = -1; i < n_basic_blocks; i++) { basic_block bb; @@ -710,5 +715,18 @@ free_aux_for_edges () for (e = bb->succ; e; e = e->succ_next) e->aux = NULL; } +} + +/* Free data allocated in edge_aux_obstack and clear AUX pointers + of all edges. */ + +void +free_aux_for_edges () +{ + if (!first_edge_aux_obj) + abort (); + obstack_free (&edge_aux_obstack, first_edge_aux_obj); first_edge_aux_obj = NULL; + + clear_aux_for_edges (); } |