This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, stage1] Make parloops gate more strict
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Mar 2015 11:16:57 +0100
- Subject: Re: [PATCH, stage1] Make parloops gate more strict
- Authentication-results: sourceware.org; auth=none
- References: <5502BCA2 dot 2010802 at mentor dot com> <CAFiYyc28u76-1Pk14zTKq8jYtpz14eH3eENOQ0Y0pAnfuU2Zmw at mail dot gmail dot com> <5502C620 dot 1050202 at mentor dot com> <CAFiYyc3ozwh_gfwogg+MwUJUSub7X3n9TeMoxg=PW_SNSP+4pg at mail dot gmail dot com> <20150313120756 dot GC1746 at tucnak dot redhat dot com> <CAFiYyc0zBO3wG17aDsX9GfPELyN5xqJa4NmANiccT=cfGURsDQ at mail dot gmail dot com> <55030211 dot 5060203 at mentor dot com>
On Fri, Mar 13, 2015 at 4:28 PM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> On 13-03-15 13:36, Richard Biener wrote:
>>
>> On Fri, Mar 13, 2015 at 1:07 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>>>
>>> On Fri, Mar 13, 2015 at 01:04:57PM +0100, Richard Biener wrote:
>>>>
>>>> Not really (I don't like -fdump-passes ...), but we need to make sure
>>>> that -fdump-passes doesn't crash (because it runs very early and
>>>> with cfun == NULL I think)
>>>
>>>
>>> If it runs with cfun == NULL, then supposedly the gates that are
>>> dependent
>>> on current function should for -fdump-passes purposes also return true
>>> if cfun == NULL (well, of course do all the unconditional checks).
>>> Though of course, with optimize/target attributes this is harder, as
>>> different functions can use different options.
>>
>>
>> Yes, one reason why I think -fdump-passes is just broken
>> implementation-wise.
>>
>
> Atm fdump-passes doesn't run with cfun == NULL.
>
> From pass_manager::dump_passes:
> ...
> FOR_EACH_FUNCTION (n)
> if (DECL_STRUCT_FUNCTION (n->decl))
> {
> node = n;
> break;
> }
>
> if (!node)
> return;
>
> push_cfun (DECL_STRUCT_FUNCTION (node->decl));
Um - this now picks a random function which may be one with
an optimize or target attribute associated to it.
Richard.
> ...
>
> This was discussed here:
> https://gcc.gnu.org/ml/gcc-patches/2011-06/msg00856.html
>
> Thanks,
> - Tom