This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 11/11] Make opt_pass and gcc::pipeline be GC-managed
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Aug 2013 12:00:56 +0200
- Subject: Re: [PATCH 11/11] Make opt_pass and gcc::pipeline be GC-managed
- Authentication-results: sourceware.org; auth=none
- References: <1374851081-32153-1-git-send-email-dmalcolm at redhat dot com> <1374851081-32153-12-git-send-email-dmalcolm at redhat dot com> <51FAD6FC dot 5060309 at redhat dot com> <1375470484 dot 4994 dot 69 dot camel at surprise> <51FC0FFD dot 8030901 at redhat dot com> <1375480409 dot 4994 dot 74 dot camel at surprise> <51FC4D01 dot 2030600 at redhat dot com>
On Sat, Aug 3, 2013 at 2:21 AM, Richard Henderson <email@example.com> wrote:
> On 08/02/2013 11:53 AM, David Malcolm wrote:
>> FWIW I had a go at avoiding templates by attempting to tell gengtype to
>> write out functions for all GTY((user)) types, regardless of whether it
>> thinks they're referenced, with this:
>> @@ -3697,7 +3697,8 @@ write_types (outf_p output_header, type_p structures, type_p param_structs,
>> /* At last we emit the functions code. */
>> oprintf (output_header, "\n/* functions code */\n");
>> for (s = structures; s; s = s->next)
>> - if (s->gc_used == GC_POINTED_TO || s->gc_used == GC_MAYBE_POINTED_TO)
>> + if (s->gc_used == GC_POINTED_TO || s->gc_used == GC_MAYBE_POINTED_TO
>> + || s->kind == TYPE_USER_STRUCT)
>> options_p opt;
>> but I ran into various "incomplete structure" errors due to gengtype's
>> lack of a full C/C++ parser.
>> Hence templates seem the sanest option.
> I was actually contemplating going the other direction -- have gengtype
> write out _less_, relying on the templates more. I hadn't gone very far
> down that road yet...
That was the original idea, btw (well, the original idea was to get rid of
gengtype completely of course).
Btw, I don't like moving the pass pipeline and pass objects into GC space.
It doesn't make much sense as pass execution is quite constrained so
passes should not allocate objects that extend the passes lifetime.