[PR42897, VTA] fix vectorization of non-PHI DEF used outside loop

Alexandre Oliva aoliva@redhat.com
Tue Feb 2 09:13:00 GMT 2010


I have come up with two patches for this PR.  Each one by itself would
be enough to fix this particular instance of the problem, but together
they retain the most debug information and avoid similar problems that
might arise in other circumstances.

The first patch arranges for us to reset debug stmts outside a loop that
refer to a vectorized DEF inside the loop, if there isn't any non-debug
use outside the loop, even if the DEF is regarded as relevant for the
vectorizer.  We used to do this only for vectorizer-irrelevant DEFs,
which proved to be insufficient.

The second patch avoids the propagation of PHI nodes when they're
replaced with a non-PHI DEF.  The patch doesn't actually check that the
replacement is taking place at the right spot, but I expect all
non-permanent removals of PHI DEFs to do this.

Regstrapped on x86_64-linux-gnu.  Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vta-tree-vect-live-in-debug-pr42897.patch
Type: text/x-diff
Size: 1405 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100202/43470e7f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vta-loop-scev-const-prop-keep-phi-def-pr42897.patch
Type: text/x-diff
Size: 887 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100202/43470e7f/attachment-0001.bin>
-------------- next part --------------

-- 
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