This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] New test for dominator optimizations bug
- From: law at redhat dot com
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 23 Aug 2003 21:11:10 -0600
- Subject: Re: [tree-ssa] New test for dominator optimizations bug
- Reply-to: law at redhat dot com
In message <1061667453.22500.12.camel@frodo.toronto.redhat.com>, Diego Novillo
writes:
>
>This test case exposes a bug in the dominator optimizer. We are
>exposing symbols without SSA version numbers.
Arguably we shouldn't have propagated "c" since it's not an SSA
variable. I'd probably tend to prefer that solution to trying to
copy the virtual operands. To get the optimization we want, we
should be copying "c" into a temporary before we use it. Both Jason
and I have bits lying around to do that.
[ I've got a one liner which will do that, but it regresses the gcov
tests and I haven't been able to sort through how all the gcov stuff
works well enough to understand why the test is failing. ]
In my experience the few times I've found myself looking to copy
virtual operands from one statement to another the better solution
has been to ensure the key operand is copied into an SSA temporary
variable and to use that SSA temporary rather than the original
variable.
>A fix is in progress. I'm going to factor out some code out of
>optimize_stmt. It's a bit difficult to follow as it is now.
Feel free, that's always been the plan -- I had planned on that
once I had a better idea of what stuff we were missing so that
any restructuring would make it easier to add the missing bits.
Jeff