This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Lno branch merge part 8 -- canonical induction variablecreation
On Fri, 27 Aug 2004, Zdenek Dvorak wrote:
> So we would in fact need to fix it in each optimization separately.
> Which is bad, since I see no good way how to find places where this
> needs to be fixed; some are obvious -- PRE, optimizations like
> whatever ? x : x ==> x in fold, etc., but there are surely more.
> :-(
The problem of finding all such places is why in the first instance
operand_equal_p should be changed. (I'm hoping that operand_equal_p is
the only place needing changing for this purpose, and that there aren't
other similar functions or tests scattered around.) Then, you can add a
function that does the asymmetric test of whether expression X can be
replaced by expression Y, and gradually change individual uses of
operand_equal_p to be able to take advantage of such an asymmetric test.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)