This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c++/70452 (regression in C++ parsing performance)
- From: Jason Merrill <jason at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Apr 2016 21:28:12 -0400
- Subject: Re: [PATCH] Fix PR c++/70452 (regression in C++ parsing performance)
- Authentication-results: sourceware.org; auth=none
- References: <1459538004-13812-1-git-send-email-patrick at parcs dot ath dot cx>
I like this approach a lot. One thing, though:
On 04/01/2016 03:13 PM, Patrick Palka wrote:
+struct GTY((chain_next ("%h.prev"))) bpr_entry
+{
+ tree body;
+ tree parms;
+ tree res;
+ struct bpr_entry *prev;
+};
+
/* Representation of entries in the constexpr function definition table. */
struct GTY((for_user)) constexpr_fundef {
tree decl;
tree body;
+ /* A chain of unused copies of this function's body awaiting reuse for
+ CALL_EXPR evaluation. */
+ struct bpr_entry *bpr_freelist;
};
The freelist should be discarded on GC. I think the way to achieve that
is to put all the freelists into a separate deletable hash table rather
than hang them off the fundefs.
Jason