[PR42630] reset debug insns referencing unroll-expanded vars

Alexandre Oliva aoliva@redhat.com
Sat Jan 9 09:10:00 GMT 2010


On Jan  8, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:

>> You need to free body in reset_debug_uses_in_loop.

Thanks.  I fixed the source of the cut&paste-induced error too ;-)

>> Otherwise ok - even though I don't like a 2nd pass over all basic blocks
>> in the loop too much.  I suppose you couldn't have avoided copying
>> the debug insn during the unrolling instead?

We are resetting the debug insns *before* unrolling.

Refraining from copying it wouldn't have the same effect.

Dropping it from the loop copies, the variable would retain its previous
binding, which would make it wrong.  At that point, a new (un)binding is
needed to make it correct.

> Having a 2nd look there should be exactly one such debug insn,

I don't see any reason why there couldn't be other debug insns that
reference the same pseudo, after or even before the assignment, within
the loop.  Other variables could have been computed, and optimized away,
in terms of the accummulator.  And then, we don't want to reset the
debug insns if we end up not performing the optimization for other
reasons.

Here's the patch I'm installing momentarily, under the “otherwise ok”
approval.  Let me know if any further changes are needed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vta-loop-var-expansion-in-unroller-pr42630.patch
Type: text/x-diff
Size: 5431 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100109/e9892f45/attachment.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