aboutsummaryrefslogtreecommitdiff
path: root/gcc/vec.c
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2013-10-28 20:03:46 +0000
committerJeff Law <law@gcc.gnu.org>2013-10-28 14:03:46 -0600
commitff4c81cccbfdd53ed93ed859b419a20af411d4ee (patch)
tree938f27ac3813c8dca626ab865ab187f166eab2ea /gcc/vec.c
parentb868b7cae49515ed5311910be0bc91bce44e47f1 (diff)
downloadgcc-ff4c81cccbfdd53ed93ed859b419a20af411d4ee.zip
gcc-ff4c81cccbfdd53ed93ed859b419a20af411d4ee.tar.gz
gcc-ff4c81cccbfdd53ed93ed859b419a20af411d4ee.tar.bz2
df-scan.c (df_collection_rec): Adjust.
* df-scan.c (df_collection_rec): Adjust. (copy_defs): New constant. (copy_uses): Likewise. (copy_eq_uses): Likewise. (copy_mw): Likewise. (copy_all): Likewise. (df_insn_rescan): Adjust. (df_notes_rescan): Likewise. (df_swap_refs): Likewise. (df_sort_and_compress_refs): Likewise. (df_sort_and_compress_mws): Likewise. (df_install_refs): Likewise. (df_install_mws): Likewise. (df_refs_add_to_chains): Add flags parameter controlling which vectors are coppied. (df_bb_refs_record): Adjust. (df_record_entry_block_defs): Likewise. (df_record_exit_block_defs): Likewise. (df_refs_verify): Likewise. (df_mws_verify): Likewise. (df_insn_refs_verify): Likewise. (df_bb_verify): Likewise. * ipa-pure-const.c (finish_state): Remove. (propagate): Adjust. * tree-data-ref.c tree-ssa-alias.c tree-ssa-loop-ivcanon.c tree-ssa-threadedge.c tree-vect-loop-manip.c tree-vect-slp.c var-tracking.c: Adjust. * vec.c (stack_vecs): Remove. (register_stack_vec): Likewise. (stack_vec_register_index): Likewise. (unregister_stack_vec): Likewise. * vec.h (struct va_stack): Remove. (struct vec<T, A, vl_ptr>): Specialize as struct vec<T, va_heap, vl_ptr> instead since va_heap is the only allocation strategy compatable with the vl_ptr layout. (struct vec<T, va_gc, vl_ptr>): Remove because it now gets an empty specialization anyway. (class stack_vec): New class. (vec_stack_alloc): Remove. (vec<T, va_heap, vl_ptr>::using_auto_storage): New method. * gcc-interface/decl.c (components_to_record): Adjust. From-SVN: r204137
Diffstat (limited to 'gcc/vec.c')
-rw-r--r--gcc/vec.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/gcc/vec.c b/gcc/vec.c
index 1303d53..f3c3315 100644
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -217,49 +217,6 @@ vec_prefix::calculate_allocation (vec_prefix *pfx, unsigned reserve,
}
-/* Stack vectors are a little different. VEC_alloc turns into a call
- to vec<T, A>::stack_reserve and passes in space allocated via a
- call to alloca. We record that pointer so that we know that we
- shouldn't free it. If the vector is resized, we resize it on the
- heap. We record the pointers in a vector and search it in LIFO
- order--i.e., we look for the newest stack vectors first. We don't
- expect too many stack vectors at any one level, and searching from
- the end should normally be efficient even if they are used in a
- recursive function. */
-
-static vec<void *> stack_vecs;
-
-/* Add a stack vector to STACK_VECS. */
-
-void
-register_stack_vec (void *vec)
-{
- stack_vecs.safe_push (vec);
-}
-
-
-/* If VEC is registered in STACK_VECS, return its index.
- Otherwise, return -1. */
-
-int
-stack_vec_register_index (void *vec)
-{
- for (unsigned ix = stack_vecs.length (); ix > 0; --ix)
- if (stack_vecs[ix - 1] == vec)
- return static_cast<int> (ix - 1);
- return -1;
-}
-
-
-/* Remove vector at slot IX from the list of registered stack vectors. */
-
-void
-unregister_stack_vec (unsigned ix)
-{
- stack_vecs.unordered_remove (ix);
-}
-
-
/* Helper for qsort; sort descriptors by amount of memory consumed. */
static int