This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Partial Patch: anti-aliasing optimizations are a pain, but we're here now


On 11/25/06, Dave Korn <dave.korn@artimi.com> wrote:
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. .....

  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.

Hi Dave,


I know that.  The default configure is for -O2.  My preference
is to not have to remember, "Oh, yes, this is interactive, so
I have to specify ``CFLAGS=-g''."  But, you are right, another
fix is to ensure that the insight package defaults to a -O build.
So, please, either change the code, specify -fno-strict-aliasing or
force optimization of -O0.  Please do not ask your clients (me :) to
remember I have to configure your package specially.  Thank you!

Regards, Bruce

P.S. I have this in my configure.ac file. Note the last entry:

case "$GCC" in
yes)
   CFLAGS=`echo $CFLAGS -Wall -Werror -Wcast-align -Wconversion \
                -Wmissing-prototypes -Wpointer-arith -Wshadow \
                -Wstrict-prototypes -Wwrite-strings -fno-strict-aliasing`
   ;;
esac


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]