Re: -O2 vs -O3

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu May 25 2000 - 07:46:30 EDT

  • Next message: Thomas Pornin: "Re: -O2 vs -O3"

    Dave Jones wrote:
    > During the early development of Powertweak I set the Makefile files to compile
    > some routines with -O3 instead of -O2. I then spent hours looking for a bug
    > which wasn't there. The optimiser was over-zealous, and removed a pointer
    > assignment.

    -O3 turns on extra inlining. Inlining can allow the optimisers to do
    fuller alias analysis. Type alias analysis breaks things which recast
    pointer types such as malloc, memcpy, graphics rendering loops, etc.
    (But usually only when they're inlined).

    Did you have -fstrict-aliasing turned on (possible by default as it was
    with some EGCS & GCC versions)?

    -- Jamie

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Thu May 25 2000 - 07:53:20 EDT