Jump to page: 1 2
Thread overview
Phobos and LTO
Mar 05, 2017
Las
Mar 05, 2017
Temtaime
Mar 05, 2017
Daniel Kozak
Mar 05, 2017
Johan Engelen
Mar 07, 2017
Temtaime
Mar 07, 2017
Johan Engelen
Mar 07, 2017
Johan Engelen
Mar 07, 2017
kinke
Mar 08, 2017
Johan Engelen
Mar 08, 2017
Johan Engelen
Mar 07, 2017
Daniel Kozak
Mar 05, 2017
Dmitry Olshansky
Mar 05, 2017
John Colvin
Mar 05, 2017
Johan Engelen
March 05, 2017
Is Phobos compiled with LTO enabled?
March 05, 2017
On Sunday, 5 March 2017 at 17:17:13 UTC, Las wrote:
> Is Phobos compiled with LTO enabled?

There is no LTO with D.
March 05, 2017
Dne 5.3.2017 v 20:31 Temtaime via Digitalmars-d napsal(a):

> On Sunday, 5 March 2017 at 17:17:13 UTC, Las wrote:
>> Is Phobos compiled with LTO enabled?
>
> There is no LTO with D.
Yes it is
https://johanengelen.github.io/ldc/2016/11/10/Link-Time-Optimization-LDC.html
March 05, 2017
On 3/5/17 6:17 PM, Las wrote:
> Is Phobos compiled with LTO enabled?

LTO is *link* time optimization so I'd say it makes no sense for libraries, as they are not linked.

---
Dmitry Olshansky
March 05, 2017
On Sunday, 5 March 2017 at 21:00:32 UTC, Dmitry Olshansky wrote:
> On 3/5/17 6:17 PM, Las wrote:
>> Is Phobos compiled with LTO enabled?
>
> LTO is *link* time optimization so I'd say it makes no sense for libraries, as they are not linked.
>
> ---
> Dmitry Olshansky

Shared libraries are linked.
March 05, 2017
On Sunday, 5 March 2017 at 21:00:32 UTC, Dmitry Olshansky wrote:
> On 3/5/17 6:17 PM, Las wrote:
>> Is Phobos compiled with LTO enabled?
>
> LTO is *link* time optimization so I'd say it makes no sense for libraries, as they are not linked.

Static libraries _are_ linked into your executable and LTO is very relevant for libraries.
Having druntime and/or Phobos compiled with LTO enabled can provide massive speedups.
I have not worked on it yet, but it'd be awesome if we could ship LDC with LTO versions of druntime and Phobos. PRs with additions to our CMake files are very welcome! :-)

cheers,
  Johan

March 05, 2017
On Sunday, 5 March 2017 at 19:52:12 UTC, Daniel Kozak wrote:
> Dne 5.3.2017 v 20:31 Temtaime via Digitalmars-d napsal(a):
>
>> On Sunday, 5 March 2017 at 17:17:13 UTC, Las wrote:
>>> Is Phobos compiled with LTO enabled?
>>
>> There is no LTO with D.
> Yes it is
> https://johanengelen.github.io/ldc/2016/11/10/Link-Time-Optimization-LDC.html

And it appeared first in the recent LDC 1.1 release.

-Johan
March 07, 2017
On Sunday, 5 March 2017 at 19:52:12 UTC, Daniel Kozak wrote:
> Dne 5.3.2017 v 20:31 Temtaime via Digitalmars-d napsal(a):
>
>> On Sunday, 5 March 2017 at 17:17:13 UTC, Las wrote:
>>> Is Phobos compiled with LTO enabled?
>>
>> There is no LTO with D.
> Yes it is
> https://johanengelen.github.io/ldc/2016/11/10/Link-Time-Optimization-LDC.html

Being specific only for LDC and only on linux - it's a lie to say simple « yes ».
March 07, 2017
On Tuesday, 7 March 2017 at 18:15:52 UTC, Temtaime wrote:
> On Sunday, 5 March 2017 at 19:52:12 UTC, Daniel Kozak wrote:
>> Dne 5.3.2017 v 20:31 Temtaime via Digitalmars-d napsal(a):
>>
>>> On Sunday, 5 March 2017 at 17:17:13 UTC, Las wrote:
>>>> Is Phobos compiled with LTO enabled?
>>>
>>> There is no LTO with D.
>> Yes it is
>> https://johanengelen.github.io/ldc/2016/11/10/Link-Time-Optimization-LDC.html
>
> Being specific only for LDC and only on linux - it's a lie to say simple « yes ».

Cheer up, you wrote "there is no LTO with D", which there clearly is. :-)

It works on OS X too.
And OS X is the only platform for which we package the LTO linker binaries in the release.

-Johan
March 07, 2017
On Tuesday, 7 March 2017 at 18:42:40 UTC, Johan Engelen wrote:
>
> It works on OS X too.
> And OS X is the only platform for which we package the LTO linker binaries in the release.

Has anybody tried LLD on Windows for D already?
https://lld.llvm.org/windows_support.html

If LLD works (or another linker that can use the LLVM plugin), then LTO is also available on Windows.

-Johan


« First   ‹ Prev
1 2