|Re: No Aliasing Compile Option markro@microsoft.UUCP (1990-05-25)|
|Re: No Aliasing Compile Option email@example.com (1990-05-29)|
|From:||markro@microsoft.UUCP (Mark ROBERTS)|
|Keywords:||aliases, optimizing compilers, C|
|Date:||25 May 90 17:19:18 GMT|
|References:||<firstname.lastname@example.org> <26547195.F69@tct.uucp> <1990May19.email@example.com> <265861D7.firstname.lastname@example.org> <1913@cod.NOSC.MIL>|
|Organization:||Microsoft Corp., Redmond WA|
In article <1913@cod.NOSC.MIL> email@example.com.UUCP (William C. Marsh) writes:
>In article <265861D7.firstname.lastname@example.org> email@example.com (Chip Salzenberg) writes:
>>Now, if the compiler determines on its own that no aliasing is
>>possible, and then does the optimization on its own, then more power
>>to it. That's great, because it will work for the individual routines
>>in my code in which no aliasing occurs. But MSC isn't that smart yet.
>I don't beleive *any* compiler could be that smart. Any routine that was
>passed a pointer couldn't use any global or static data, for fear that it
>is being aliased by the pointer. The compiler, unless it looks at all the
>code (and all the possible ways of calling that function) could not possibly
>do this kind of optimization on it's own.
Actually, it is possible to do a pretty decent job of alias analysis; it is
just very computationaly expensive. We have been investigating some
possibilities as an outgrowth of our interprocedural optimization research and
have developed an algorithm we think will work. Unfortunately, it is order n
to the power you don't even want to think about. And assumes an underlying
full interprocedural analysis to boot.
For now I think we're stuck with some sort of 'relax aliasing' option for
those wanting to get the most out of their compiler and willing to cooperate a
little bit with it.
[Now Preston can give us his 'why I like Fortran' spiel ;-) ]
Return to the
Search the comp.compilers archives again.