[Vm-dev] VM Maker: VMMaker.oscog-nice.1813.mcz

John McIntosh johnmci at smalltalkconsulting.com
Wed Apr 20 16:44:10 UTC 2016


for cmake I've elsewhere had to do the follow in the cmake script to set
the clang as the linker, and passing -flto to the compiler.

 set(CMAKE_LINKER "/usr/bin/clang")

 add_definitions("-flto ")


On Wed, Apr 20, 2016 at 9:33 AM, Levente Uzonyi <leves at caesar.elte.hu>
wrote:

>
> Hi Eliot,
>
> On Wed, 20 Apr 2016, Eliot Miranda wrote:
>
>
>> Hi Levente,
>>
>>
>> On Apr 20, 2016, at 4:17 AM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
>>>
>>> Hi Nicolas,
>>>
>>> IMHO the best would still be to use macros for as many of these
>>> functions as possible.
>>> The link-time optimization has its limitations, and it will not really
>>> work for the VM, at least not the way it could provide speedups comparable
>>> to macro use.
>>>
>>
>> +1
>>
>> This is because the optimizer won't optimize everything blindly. And
>>> since these functions are not used from the main VM code, the optimizer
>>> will consider these optimizations unnecessary, which is probably why only
>>> the smallest functions were inlined in my experimental compilation.
>>> However the optimizer probably inlined many other things and removed
>>> some cruft as well, because it worked on the whole VM. The size of the
>>> resulting binary was 5.1MB instead of the usual 6.3MB.
>>>
>>
>> Interesting.  That's a big win.  Looks like LTO should be adopted as
>> broadly as possible.  Did you run external plugin tests?  Anything broken?
>>
>
> Since autoconf went nuts from the -flto flag (it couldn't correctly set
> the value of HAVE_LIBDL), I had to manually tweak the generated Makefiles
> to make the compilation work. Therefore I only added this flag to the
> Makefiles in the vm, LargeIntegers and the main build directory, because
> what I wanted to see was if this flag can speed primDigitCompare up.
> So, once the flag works with autoconf, the actual gain can be bigger.
>
> Levente
>
>
>>
>>> Levente
>>>
>>>
>>


-- 
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd
https://www.linkedin.com/in/smalltalk
===========================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160420/26c890ad/attachment.htm


More information about the Vm-dev mailing list