www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Changing -O to be equivalent to -O3

reply "David Nadlinger" <see klickverbot.at> writes:
See: https://github.com/ldc-developers/ldc/pull/315

Any further opinions?

David
Mar 17 2013
next sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Sunday, 17 March 2013 at 18:33:57 UTC, David Nadlinger wrote:
 See: https://github.com/ldc-developers/ldc/pull/315

 Any further opinions?

 David
why not O5?
Mar 17 2013
parent reply "David Nadlinger" <see klickverbot.at> writes:
On Monday, 18 March 2013 at 02:25:17 UTC, John Colvin wrote:
 On Sunday, 17 March 2013 at 18:33:57 UTC, David Nadlinger wrote:
 See: https://github.com/ldc-developers/ldc/pull/315

 Any further opinions?

 David
why not O5?
Because -O5 is the same as -O3 right now. I thought this was documented somewhere, but apparently this is not the case. Do you want to fix it? ;) David
Mar 18 2013
parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 18 March 2013 at 12:42:10 UTC, David Nadlinger wrote:
 On Monday, 18 March 2013 at 02:25:17 UTC, John Colvin wrote:
 On Sunday, 17 March 2013 at 18:33:57 UTC, David Nadlinger 
 wrote:
 See: https://github.com/ldc-developers/ldc/pull/315

 Any further opinions?

 David
why not O5?
Because -O5 is the same as -O3 right now. I thought this was documented somewhere, but apparently this is not the case. Do you want to fix it? ;) David
Far from being documented as equivalent to O3, ldc2 --help says O4 and O5 are "link-time optimization" Is this also incorrect?
Mar 18 2013
parent "David Nadlinger" <see klickverbot.at> writes:
On Monday, 18 March 2013 at 16:39:14 UTC, John Colvin wrote:
 Far from being documented as equivalent to O3, ldc2 --help says 
 O4 and O5 are "link-time optimization" Is this also incorrect?
Well, it's correct in so far as they were intended for LTO. But as far as I remember, they were never implemented, and certainly aren't right now. David
Mar 18 2013
prev sibling next sibling parent "deadalnix" <deadalnix gmail.com> writes:
On Sunday, 17 March 2013 at 18:33:57 UTC, David Nadlinger wrote:
 See: https://github.com/ldc-developers/ldc/pull/315

 Any further opinions?

 David
What is the current behavior ? What is clang's behavior ?
Mar 18 2013
prev sibling parent reply Marco Leise <Marco.Leise gmx.de> writes:
Am Sun, 17 Mar 2013 19:33:54 +0100
schrieb "David Nadlinger" <see klickverbot.at>:

 See: https://github.com/ldc-developers/ldc/pull/315
 
 Any further opinions?
 
 David
My opinion is to benchmark. How much longer is the compile time? How many programs benefit? How many bad cases are there where the optimizations slow down the executable by excessive unrolling or similar? Last time I tried LDC's optimizations I saw a minor slowdown in one program, and overall little gain (compared to the more substantial gains of -O3 in GDC). -- Marco
May 26 2013
parent Marco Leise <Marco.Leise gmx.de> writes:
P.S.: If this is for the ldmd wrapper only I agree with
the arguments for merging the pull request. I.e.: +1

-- 
Marco
May 26 2013