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

So maybe it should just call clear_bb_flags instead of doing the loop itself? Ok if that works.


Reply via email to