aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2006-04-12 17:20:22 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2006-04-12 17:20:22 +0000
commit597d6703b871bde0af2768fb0a3d917da082e348 (patch)
tree66d8f4e05e0515b85712607dfa5be28d35e0661b /gcc/function.c
parentdacb336e10d3679e72c7a6e3d6a3ff9601234e5e (diff)
downloadgcc-597d6703b871bde0af2768fb0a3d917da082e348.zip
gcc-597d6703b871bde0af2768fb0a3d917da082e348.tar.gz
gcc-597d6703b871bde0af2768fb0a3d917da082e348.tar.bz2
Makefile.in (GTFILES): Move functions.h after tree.h.
* Makefile.in (GTFILES): Move functions.h after tree.h. * function.c (reset_block_changes, record_block_change, check_block_change, free_block_changes): Use VEC instead of VARRAY. * function.h (function): Change the type of ib_boundaries_block to VEC(tree,gc) *. * tree-inline.c (copy_cfg_body): Initialize ib_boundaries_block to NULL instead of (varray_type) 0. From-SVN: r112894
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/function.c b/gcc/function.c
index ecdf2823..26c99fa 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5518,8 +5518,8 @@ reposition_prologue_and_epilogue_notes (rtx f ATTRIBUTE_UNUSED)
void
reset_block_changes (void)
{
- VARRAY_TREE_INIT (cfun->ib_boundaries_block, 100, "ib_boundaries_block");
- VARRAY_PUSH_TREE (cfun->ib_boundaries_block, NULL_TREE);
+ cfun->ib_boundaries_block = VEC_alloc (tree, gc, 100);
+ VEC_quick_push (tree, cfun->ib_boundaries_block, NULL_TREE);
}
/* Record the boundary for BLOCK. */
@@ -5535,13 +5535,12 @@ record_block_change (tree block)
if(!cfun->ib_boundaries_block)
return;
- last_block = VARRAY_TOP_TREE (cfun->ib_boundaries_block);
- VARRAY_POP (cfun->ib_boundaries_block);
+ last_block = VEC_pop (tree, cfun->ib_boundaries_block);
n = get_max_uid ();
- for (i = VARRAY_ACTIVE_SIZE (cfun->ib_boundaries_block); i < n; i++)
- VARRAY_PUSH_TREE (cfun->ib_boundaries_block, last_block);
+ for (i = VEC_length (tree, cfun->ib_boundaries_block); i < n; i++)
+ VEC_safe_push (tree, gc, cfun->ib_boundaries_block, last_block);
- VARRAY_PUSH_TREE (cfun->ib_boundaries_block, block);
+ VEC_safe_push (tree, gc, cfun->ib_boundaries_block, block);
}
/* Finishes record of boundaries. */
@@ -5556,17 +5555,17 @@ check_block_change (rtx insn, tree *block)
{
unsigned uid = INSN_UID (insn);
- if (uid >= VARRAY_ACTIVE_SIZE (cfun->ib_boundaries_block))
+ if (uid >= VEC_length (tree, cfun->ib_boundaries_block))
return;
- *block = VARRAY_TREE (cfun->ib_boundaries_block, uid);
+ *block = VEC_index (tree, cfun->ib_boundaries_block, uid);
}
/* Releases the ib_boundaries_block records. */
void
free_block_changes (void)
{
- cfun->ib_boundaries_block = NULL;
+ VEC_free (tree, gc, cfun->ib_boundaries_block);
}
/* Returns the name of the current function. */