diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-30 23:57:30 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-30 23:57:30 +0000 |
commit | 11aefdc9c765c0d1b5dead7e0e6b2afd8ce4dab4 (patch) | |
tree | 552dfeddfb88c26ea64400843d4c7e4598f0a949 /gcc/tree-outof-ssa.c | |
parent | 25928e341ebd039dabb6959a5dc63fdadf8e4d65 (diff) | |
download | gcc-11aefdc9c765c0d1b5dead7e0e6b2afd8ce4dab4.tar.gz |
* tree-outof-ssa.c (_elim_graph): Change the type of STACK to
VEC(int,heap).
(new_elim_graph, delete_elim_graph, elim_forward,
eliminate_phi): Use the VEC API on STACK.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109182 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-outof-ssa.c')
-rw-r--r-- | gcc/tree-outof-ssa.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index ae93bcaa94a..6431b457bb7 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -91,7 +91,7 @@ typedef struct _elim_graph { sbitmap visited; /* Stack for visited nodes. */ - varray_type stack; + VEC(int,heap) *stack; /* The variable partition map. */ var_map map; @@ -224,7 +224,7 @@ new_elim_graph (int size) g->nodes = VEC_alloc (tree, heap, 30); g->const_copies = VEC_alloc (tree, heap, 20); g->edge_list = VEC_alloc (int, heap, 20); - VARRAY_INT_INIT (g->stack, 30, " Elimination Stack"); + g->stack = VEC_alloc (int, heap, 30); g->visited = sbitmap_alloc (size); @@ -248,6 +248,7 @@ static inline void delete_elim_graph (elim_graph g) { sbitmap_free (g->visited); + VEC_free (int, heap, g->stack); VEC_free (int, heap, g->edge_list); VEC_free (tree, heap, g->const_copies); VEC_free (tree, heap, g->nodes); @@ -418,7 +419,7 @@ elim_forward (elim_graph g, int T) if (!TEST_BIT (g->visited, S)) elim_forward (g, S); }); - VARRAY_PUSH_INT (g->stack, T); + VEC_safe_push (int, heap, g->stack, T); } @@ -514,7 +515,7 @@ eliminate_phi (edge e, elim_graph g) tree var; sbitmap_zero (g->visited); - VARRAY_POP_ALL (g->stack); + VEC_truncate (int, g->stack, 0); for (x = 0; VEC_iterate (tree, g->nodes, x, var); x++) { @@ -524,10 +525,9 @@ eliminate_phi (edge e, elim_graph g) } sbitmap_zero (g->visited); - while (VARRAY_ACTIVE_SIZE (g->stack) > 0) + while (VEC_length (int, g->stack) > 0) { - x = VARRAY_TOP_INT (g->stack); - VARRAY_POP (g->stack); + x = VEC_pop (int, g->stack); if (!TEST_BIT (g->visited, x)) elim_create (g, x); } |