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: Wed, 21 Oct 2015 11:59:01 +0200
- 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>
On Wed, Oct 21, 2015 at 11:19 AM, Martin LiÅka <mliska@suse.cz> wrote:
> On 10/20/2015 03:39 PM, Richard Biener wrote:
>> On Tue, Oct 20, 2015 at 3:00 PM, Martin LiÅka <mliska@suse.cz> wrote:
>>> Hello.
>>>
>>> As part of upcoming merge of HSA branch, we would like to have possibility to terminate
>>> pass manager after execution of the HSA generation pass. The HSA back-end is implemented
>>> as a tree pass that directly emits HSAIL from gimple tree representation. The pass operates
>>> on clones created by HSA IPA pass and the pass manager should stop execution of further
>>> RTL passes.
>>>
>>> Suggested patch survives bootstrap and regression tests on x86_64-linux-pc.
>>>
>>> What do you think about it?
>>
>> Are you sure it works this way?
>>
>> Btw, you will miss executing of all the cleanup passes that will
>> eventually free memory
>> associated with the function. So I'd rather support a
>> TODO_discard_function which
>> should basically release the body from the cgraph.
>
> Hi.
>
> Agree with you that I should execute all TODOs, which can be easily done.
> However, if I just try to introduce the suggested TODO and handle it properly
> by calling cgraph_node::release_body, then for instance fn->gimple_df, fn->cfg are
> released and I hit ICEs on many places.
>
> Stopping the pass manager looks necessary, or do I miss something?
"Stopping the pass manager" is necessary after TODO_discard_function, yes.
But that may be simply done via a has_body () check then?
> Thanks,
> Martin
>
>>
>> Richard.
>>
>>> Thanks,
>>> Martin
>