bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


From: Gabriel Dos Reis
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: 02 Jan 2007 12:43:56 +0100

Gerald Pfeifer <address@hidden> writes:

| On Tue, 2 Jan 2007, Gabriel Dos Reis wrote:
| >|>   for (i = 1; i < m; ++i)
| >|>     {
| >|>       if (i > 0)
| >|>   bar ();
| >|>     }
| >| Of course, this is an example where either the programmer is doing 
| >| something very silly or else is expecting overflow and depending on 
| >| wrap semantics, so it seems to me marginal to remove that "if".  My 
| >| suggestion would be to issue a warning saying that the test will never 
| >| be false, but leaving it in.
| > That make sense to me.
| 
| I'm worried about our ability to optimize deeply inlined code and things 
| like template-heavy C++ code if do skip optimizations like this.

I suspect part of Richard K.'s questions has been to determine, based
on data, what improvements we actually gain from doing that kind of
elimination predicated on undefined-ness of signed integer
arithmetic overflow.  It would be also useful to see how that affects
inlining (for inlining, we may be able to adequately annotate the trees).
I fear I haven't seen any.

-- Gaby




reply via email to

[Prev in Thread] Current Thread [Next in Thread]