[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
From: |
Vincent Lefevre |
Subject: |
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..." |
Date: |
Sun, 31 Dec 2006 15:48:21 +0100 |
User-agent: |
Mutt/1.5.13-vl-r14963 (2006-12-20) |
On 2006-12-31 09:08:21 -0500, Richard Kenner wrote:
> > In fact the wrap around range test is a standard idiom for "hand
> > optimization" of range tests.
>
> It's also one that GCC uses internally, but you do it in *unsigned*
> to avoid the undefined overflow.
If done in unsigned, this won't lead to any optimization, as unsigned
arithmetic doesn't have overflows. So, if you write "a - 10" where a
is unsigned, the compiler can't assume anything, whereas is a is
signed, the compiler can assume that a >= INT_MIN + 10, reducing
the range for a, and possibly allowing some optimizations.
--
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", (continued)
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gabriel Dos Reis, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Andrew Pinski, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gabriel Dos Reis, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Andrew Pinski, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Vincent Lefevre, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Richard Kenner, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...",
Vincent Lefevre <=
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Vincent Lefevre, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Vincent Lefevre, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gerald Pfeifer, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gabriel Dos Reis, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Richard Kenner, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Vincent Lefevre, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Duncan Sands, 2006/12/31