This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 06/11] Rewrite how instances of passes are cloned
- From: Richard Henderson <rth at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 01 Aug 2013 10:56:08 -1000
- Subject: Re: [PATCH 06/11] Rewrite how instances of passes are cloned
- References: <1374851081-32153-1-git-send-email-dmalcolm at redhat dot com> <1374851081-32153-7-git-send-email-dmalcolm at redhat dot com> <1375379726 dot 4994 dot 61 dot camel at surprise>
On 08/01/2013 07:55 AM, David Malcolm wrote:
> On Fri, 2013-07-26 at 11:04 -0400, David Malcolm wrote:
>> > gcc/
>> > Rewrite how instances of passes are cloned to remove assumptions
>> > about their sizes (thus allowing pass subclasses to have
>> > additional data fields, albeit non-GC-managed ones at this point).
>> > * passes.c (make_pass_instance): Now that passes have clone
>> > methods, rewrite this function to eliminate XNEW and memcpy
>> > calls that used hardcoded sizes. Since this function no longer
>> > creates pass instances, rename it to...
>> > (add_pass_instance): ...this. Document the old way that passes
>> > were numbered and flagged, and rework this function to continue
>> > using it.
>> > (next_pass_1): Add an initial_pass argument for use by
>> > add_pass_instance.
>> > (position_pass): When adding multiple instances of a pass, use
>> > the pass's clone method, rather than relying on the XNEW/memcpy
>> > within the former make_pass_instance (now add_pass_instance).
>> > (pipeline::pipeline): When invoking next_pass_1, also supply the
>> > initial instance of the current pass within the pipeline.
Ok (with the pass_manager change).