This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: basic_block flags, BB_VISITED
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, GCC Development <gcc at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, kugan dot vivekanandarajah at linaro dot org, Nathan Sidwell <nathan at acm dot org>
- Date: Fri, 14 Oct 2016 11:26:59 +0200
- Subject: Re: basic_block flags, BB_VISITED
- Authentication-results: sourceware.org; auth=none
- References: <8760ov2wbg.fsf@hertz.schwinge.homeip.net> <6175ee3b-74d4-0f29-c9ff-163c201d1f8d@redhat.com>
On Fri, Oct 14, 2016 at 11:15 AM, Bernd Schmidt <bschmidt@redhat.com> wrote:
> On 10/14/2016 10:01 AM, Thomas Schwinge wrote:
>>
>> After the "Add Early VRP" GCC trunk commit r240291 (Kugan CC for your
>> information), I've been observing all kinds of OpenACC offloading
>> failures. I now figured out what's going on.
>>
>> The "evrp" pass uses basic_block's BB_VISITED flag. It first clears
>> these all, gcc/tree-vrp.c:execute_early_vrp:
>>
>> FOR_EACH_BB_FN (bb, cfun)
>> {
>> bb->flags &= ~BB_VISITED;
>>
>> ..., then does its processing, and at the end, clears these again:
>>
>> FOR_EACH_BB_FN (bb, cfun)
>> bb->flags &= ~BB_VISITED;
>>
>> I note that this looks slightly different from what
>> gcc/cfg.c:clear_bb_flags whould be doing, which works from
>> ENTRY_BLOCK_PTR_FOR_FN onwards:
>
>
> So maybe it should just call clear_bb_flags instead of doing the loop
> itself? Ok if that works.
That doesn't generally work, it clears too many flags (it was appearantly
designed for RTL).
Richard.
>
> Bernd
>