This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Pass manager: add support for termination of pass list
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin LiÅka <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 Nov 2015 14:46:10 +0100
- Subject: Re: [PATCH] Pass manager: add support for termination of pass list
- Authentication-results: sourceware.org; auth=none
- References: <56263B07 dot 1010900 at suse dot cz> <CAFiYyc3PozYWSPEJvbBaQNT=UMhJTFS0nh+4AJsfRjjL2E27RA at mail dot gmail dot com> <562758A9 dot 3070309 at suse dot cz> <CAFiYyc0OWMO9ycyfds2rWOmi0j4e9pAhzEwtbKUujnK_xEwOrg at mail dot gmail dot com> <562775F3 dot 1050609 at suse dot cz> <CAFiYyc3gHUH=n7oep2Ynjdqks16rm_LmPXQPf5PNpFB5Go=RCQ at mail dot gmail dot com> <5628C262 dot 8000205 at suse dot cz> <CAFiYyc3GwQu58mmdEdWLGB3+iODREUC-KHBXhAWbz3+_4cJLNQ at mail dot gmail dot com> <562F6FC6 dot 1020200 at suse dot cz> <CAFiYyc2Qh8CjmKCwK8S=K4S33C6gR6AYf86jepzgMLPmZ5r3yA at mail dot gmail dot com> <562F9889 dot 2070704 at suse dot cz> <CAFiYyc1MZsOhgy+s9rmetE5T6w2jLdF0uR6ieuD5eBBjFaDoXg at mail dot gmail dot com> <5631EBA9 dot 2040105 at suse dot cz> <CAFiYyc1=T67BqzaKrE8=g=uf29beTY=xQUQNBBW_P0JAOov=aA at mail dot gmail dot com> <56323219 dot 4060802 at suse dot cz> <CAFiYyc304hRCTumKK=WSQHrYiyr8dAH7+MFUW7Fd-NR-GvpG4w at mail dot gmail dot com> <56335BB5 dot 8090408 at suse dot cz> <CAFiYyc18qFKdvePFHrEJT75pU_T+somDxdwOtp514Dc17OqfBA at mail dot gmail dot com> <56336858 dot 4060905 at suse dot cz>
On Fri, Oct 30, 2015 at 1:53 PM, Martin LiÅka <mliska@suse.cz> wrote:
> On 10/30/2015 01:13 PM, Richard Biener wrote:
>> So I suggest to do the push/pop of cfun there.
>> do_per_function_toporder can be made static btw.
>>
>> Richard.
>
> Right, I've done that and it works (bootstrap has been currently running),
> feasible for HSA branch too.
>
> tree-pass.h:
>
> /* Declare for plugins. */
> extern void do_per_function_toporder (void (*) (function *, void *), void *);
>
> Attaching the patch that I'm going to test.
Err.
+ cgraph_node::get (current_function_decl)->release_body ();
+
+ current_function_decl = NULL;
+ set_cfun (NULL);
I'd have expected
tree fn = cfun->decl;
pop_cfun ();
gcc_assert (!cfun);
cgraph_node::get (fn)->release_body ();
here.
> Martin
>