On Fri, Apr 1, 2016 at 9:28 PM, Jason Merrill <ja...@redhat.com> wrote: > 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 >
Would instead marking the bpr_freelist field as GTY ((skip)) have the same effect?