This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allocate all target globals using GC for SWITCHABLE_TARGETs
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 08 Jan 2014 19:41:26 +0000
- Subject: Re: [PATCH] Allocate all target globals using GC for SWITCHABLE_TARGETs
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W8CEA24B3CD3CF0DE08FBAE4F70 at phx dot gbl> <87iotxv211 dot fsf at talisman dot default> <20140107193939 dot GY892 at tucnak dot redhat dot com> <CAFiYyc1CWvKmhf12XRep3AwKGaVxC4QerHsco8kJVkZD7xxa5g at mail dot gmail dot com> <20140108124540 dot GG892 at tucnak dot redhat dot com> <20140108183415 dot GK892 at tucnak dot redhat dot com>
Jakub Jelinek <jakub@redhat.com> writes:
> 2014-01-08 Jakub Jelinek <jakub@redhat.com>
>
> * target-globals.c (save_target_globals): Allocate most of the
> structs using GC in payload of target_globals struct instead
> of allocating them on the heap.
Looks good to me FWIW. I don't know either way about the one-big-blob thing.
Note that we'll still leak memory when deleting TARGET_OPTION_NODEs
because target_ira_int and target_lra_int have pointers to heap-allocated
storage.
Thanks,
Richard