[vta, PR41926, graphite?] track debug uses during vectorization

Richard Guenther richard.guenther@gmail.com
Sun Nov 8 10:04:00 GMT 2009


On Sun, Nov 8, 2009 at 9:07 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
> PR debug/41926 was a case in which a debug use outside a vectorized loop
> remained, referencing an SSA DEF that no longer dominated the use
> because of vectorization.
>
> In order to fix this, I extended the live-tracking information so as to
> record debug uses in addition to nondebug uses.  Then, if a name in the
> vectorized loop is found to be referenced outside the loop only by debug
> insns (case in which we won't create a PHI node at the join point), we
> reset the debug use.
>
> I managed to convert the testcase to C, but it requires the patch I've
> just posted to exercise the bug fixed by the patch below.  I'm not happy
> with the options-management in this testcase, though.  I need
> -ffast-math and -funroll-loops to trigger it, so the standard names
> handled by vect.exp don't work, and I can't add options to the default
> per-machine vectorization options vect.exp sets up.  So I made in
> x86-only, but I'd appreciate suggestions on how to make it better.
> Anyone?
>
> Bootstrapped on x86_64-linux-gnu; regstrapping on that and
> ia64-linux-gnu.  Ok to install?

Ugh.  You could simplify the patch if you'd unconditionally do

          if (!STMT_VINFO_RELEVANT_P (stmt_info)
              && !STMT_VINFO_LIVE_P (stmt_info))
            {
               if (MAY_HAVE_DEBUG_STMTS)
                 vect_loop_kill_debug_uses (loop, phi);
               continue;
            }

it looks wrong to have a tri-state liveness to me, at least it confuses
the occasional reader and the enum casts are ugly anyway.

If the above works out for you a patch along the above is pre-approved.

Thanks,
Richard.

>
>
>
> --
> Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
> You must be the change you wish to see in the world. -- Gandhi
> Be Free! -- http://FSFLA.org/   FSF Latin America board member
> Free Software Evangelist      Red Hat Brazil Compiler Engineer
>
>



More information about the Gcc-patches mailing list