[vta, graphite?] propagate degenerate phi nodes into debug stmts

Alexandre Oliva aoliva@redhat.com
Thu Nov 19 04:18:00 GMT 2009


On Nov 17, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:

>>> This looks odd.  SSA DEF operand iteration should walk the PHI defs
>>> as well, so the change should not be necessary.

>> I thought so, too, but by the time we get there, the operands of the PHI
>> stmt have already been disconnected.

> It shouldn't be.  Please try to figure out why instead.

Gotta use a different FOR_EACH macro to handle PHI nodes.  

s/FOR_EACH_SSA_DEF_OPERAND/FOR_EACH_PHI_OR_STMT_DEF/ fixed it.

In order to make sure no other such mistakes had been made in GCC, I
added an assertion check in the iterator initializer and adjusted the
uses of GIMPLE_PHI nodes that triggered the assertion, but that would
have done nothing whatsoever in its absence.  I haven't looked into
whether doing nothing is correct.

Should I check this in?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-no-nonphi-iter-on-phi.patch
Type: text/x-diff
Size: 2111 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091119/2eda6b9c/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