This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: basic_block flags, BB_VISITED


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]