diff options
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 19 |
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. */ |