On Fri, Oct 30, 2015 at 1:53 PM, Martin Liška <[email protected]> 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
>