From: Richard Biener Date: Thu, 21 Nov 2019 08:39:53 +0000 (+0000) Subject: cfganal.c (pre_and_rev_post_order_compute_fn): Use an auto_bb_flag instead of an... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3d2f8e21ca895f50f024a671270c2b38a4b5b72;p=gcc.git cfganal.c (pre_and_rev_post_order_compute_fn): Use an auto_bb_flag instead of an sbitmap for visited handling. 2019-11-21 Richard Biener * cfganal.c (pre_and_rev_post_order_compute_fn): Use an auto_bb_flag instead of an sbitmap for visited handling. * lra.c (lra_insn_recog_data_pool): New. (free_insn_recog_data): Adjust. (finish_insn_recog_data): Release lra_insn_recog_data_pool. (lra_set_insn_recog_data): Allocate from lra_insn_recog_data_pool. * tree-ssa-structalias.c (equiv_class_hasher): Change to nofree. (equiv_class_obstack): New. (equiv_class_lookup_or_add): Allocate from equiv_class_obstack. (perform_var_substitution): Initialize equiv_class_obstack. (free_var_substitution_info): Free equiv_class_obstack. From-SVN: r278543 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 904b54c9ebe..a669c28da61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-11-21 Richard Biener + + * tree-ssa-structalias.c (equiv_class_hasher): Change to nofree. + (equiv_class_obstack): New. + (equiv_class_lookup_or_add): Allocate from equiv_class_obstack. + (perform_var_substitution): Initialize equiv_class_obstack. + (free_var_substitution_info): Free equiv_class_obstack. + 2019-11-20 Jan Hubicka * ipa-inline.c (want_early_inline_function_p): Do not estimate diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 68298ea7eb2..f7a17eb74d3 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -1911,7 +1911,7 @@ typedef const struct equiv_class_label *const_equiv_class_label_t; /* Equiv_class_label hashtable helpers. */ -struct equiv_class_hasher : free_ptr_hash +struct equiv_class_hasher : nofree_ptr_hash { static inline hashval_t hash (const equiv_class_label *); static inline bool equal (const equiv_class_label *, @@ -1944,6 +1944,8 @@ static hash_table *pointer_equiv_class_table; classes. */ static hash_table *location_equiv_class_table; +struct obstack equiv_class_obstack; + /* Lookup a equivalence class in TABLE by the bitmap of LABELS with hash HAS it contains. Sets *REF_LABELS to the bitmap LABELS is equivalent to. */ @@ -1960,7 +1962,7 @@ equiv_class_lookup_or_add (hash_table *table, slot = table->find_slot (&ecl, INSERT); if (!*slot) { - *slot = XNEW (struct equiv_class_label); + *slot = XOBNEW (&equiv_class_obstack, struct equiv_class_label); (*slot)->labels = labels; (*slot)->hashcode = ecl.hashcode; (*slot)->equivalence_class = 0; @@ -2334,6 +2336,7 @@ perform_var_substitution (constraint_graph_t graph) scc_info *si = new scc_info (size); bitmap_obstack_initialize (&iteration_obstack); + gcc_obstack_init (&equiv_class_obstack); pointer_equiv_class_table = new hash_table (511); location_equiv_class_table = new hash_table (511); @@ -2473,6 +2476,7 @@ free_var_substitution_info (class scc_info *si) pointer_equiv_class_table = NULL; delete location_equiv_class_table; location_equiv_class_table = NULL; + obstack_free (&equiv_class_obstack, NULL); bitmap_obstack_release (&iteration_obstack); }