This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
RE: Partial Patch: anti-aliasing optimizations are a pain, but we're here now
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Bruce Korb'" <Bruce dot Korb at gmail dot com>, <insight at sourceware dot org>
- Cc: <bkorb at gnu dot org>
- Date: Sun, 26 Nov 2006 01:04:39 -0000
- Subject: RE: Partial Patch: anti-aliasing optimizations are a pain, but we're here now
On 25 November 2006 21:48, Bruce Korb wrote:
> This patch is important, by the way, as GCC reserves the right to
> permute code
> that causes problems if you do not alias pointers with unions. (Of
> course, since
> this is a trivial permutation, one could ask why the compiler doesn't
> just internally
> apply such logic itself. I've asked that question; but the response is
> that you
> shouldn't be coding that way.)
I really think you misunderstand: the compiler already does do *exactly*
that: just choose -O0, and it will assume that anything could potentially
alias with anything else. The reason it doesn't do that at other -O levels is
because it makes for lousy codegen.
cheers,
DaveK
--
Can't think of a witty .sigline today....