fix latent compare-debug problem in cprop

Alexandre Oliva aoliva@redhat.com
Sat Jun 4 12:55:00 GMT 2011


If cprop regards changes to debug insns as “changed”, it will perform
cfg optimizations and more, even if no non-debug insns were changed,
causing divergence between -g and -g0 compilations.

This was observed during bootstrap-debug-lib of the SSA coalesce patch,
building a-strsea.adb with -fcompare-debug.  Because of different CFGs,
cse2 chose different equivalent pseudos for an insn.  -fcompare-debug
detected the difference in REG notes, even though the executable code
turned out to be the same.  We can't count on this luck, though: other
optimization passes could apply different transformations to the
different CFGs, producing different executable code, which must never
happen.

This patch fixes the problem, disregarding changes to debug insns as
“changed”.  Regstrapped on x86_64-linux-gnu and i686-linux-gnu.  Ok to
install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vta-cprop-unchanged-debug.patch
Type: text/x-diff
Size: 547 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110604/89ffe3ba/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