[PATCH] Fix DEBUG stmt handling in the vectorizer (PR debug/42604)
Alexandre Oliva
aoliva@redhat.com
Wed Jan 6 19:54:00 GMT 2010
On Jan 6, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:
> Hm, I fail to see where there can be such a case w/o a definition
> which means a different SSA name ...
Remember that we're propagating the PHI def when the arg we're replacing
is the one used in a debug var.
<pre-clone of the loop that sets x_5, to be renumbered to x_31>
<bb>:
x_1 = PHI <x_5>;
<loop that sets x_5>
<bb>:
x_3 = PHI <x_5>;
# DEBUG x => x_5;
Surely you agree we don't want x_1 in the debug stmt. We want x_3.
The same applies if we insert a duplicate of the loop *after* it rather
than before, or even both before and after.
> Btw, do you now insert PHIs for the case where the only uses outside
> of the loop are debug-uses?
No, that would most certainly wreak havoc in -fcompare-debug.
We use PHIs that would have been added anyway, or we reset the debug
stmt that would require one. I have some thoughts on how to avoid
resetting, but I'll save them for another day.
--
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