This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] More aliasing fixes
On Wed, 2003-12-17 at 07:59, Diego Novillo wrote:
> With the current implementation we'd generate 14 vops, the new one would
> generate 18 vops. But we would have to experiment with real code. I
> can see definite advantages to the new scheme in pointer-heavy code.
>
Wait. There's a fatal flaw in this scheme that I didn't realize
yesterday. You will be relating variables that cannot possibly alias
each other and block VN based optimizations and DCE. Consider:
foo (int i)
{
int a, b;
int *p;
p = (i > 50) ? &a : &b;
a = 50;
b = 3;
if (a > 0)
*p = 5;
}
The assignment to 'b' will block DOM from propagating 50 into (a > 0),
because the assignment to b will create a new version of p's MT.
Diego.