This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix DEBUG stmt handling in the vectorizer (PR debug/42604)
On Wed, Jan 6, 2010 at 6:16 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
> On Jan ?6, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:
>
>> I'd say drop Jakubs fix for now - I'd rather have a testcase that shows it
>> is still needed.
>
> 'k
>
>> Also I wonder why you need the delayed debug-stmt processing
>
> Oops, sorry, I forgot to explain it. ?See below.
>
>> I suppose you have ?a testcase that breaks otherwise?
>
> The same testcase, pr42604.c. ?We have to “propagate” the last PHI
> substitution first. ?If we propagate the first one first, the debug uses
> will end up referencing a non-dominating use, and when we get to the one
> that would get us the right answer, it wouldn't find anything to adjust.
>
> Think of it this way, given:
>
> ?x = foo;
> ...
> ?x = bar;
> ...
> ?y = x;
>
> If you propagate the first x into y= first, you'll get foo rather than
> bar, which is what you need. ?The case at hand isn't exactly the same
> because we're not talking about assignments, but rather about adjusting
> PHI nodes, but it's kind of similar: substitute the closest dominating
> equivalence first.
Hm, I fail to see where there can be such a case w/o a definition
which means a different SSA name ...
Btw, do you now insert PHIs for the case where the only uses outside
of the loop are debug-uses?
Thanks,
Richard.