[tarantool-patches] Re: [PATCH v2 2/3] Add LTO support

Alexander Turenko alexander.turenko at tarantool.org
Wed Oct 17 10:13:25 MSK 2018


On Tue, Oct 16, 2018 at 09:09:02PM +0300, Konstantin Osipov wrote:
> * Alexander Turenko <alexander.turenko at tarantool.org> [18/10/15 10:15]:
> > From: AKhatskevich <avkhatskevich at tarantool.org>
> > 
> > Added -DENABLE_LTO=ON/OFF cmake option, OFF by default.
> > 
> > LTO speeds up cpu-intensive workloads by up to 20% (see [1] and [2]).
> > 
> > Requirements for LTO enabling:
> 
> to enable LTO, not "for LTO enabling".
> 
> The same applies to cmake message:
> > +if(CMAKE_VERSION VERSION_LESS 3.9)
> > +    message(FATAL_ERROR "cmake >= 3.9 is needed for LTO enabling")
> > +endif()
> 

Fixed.

> 
> > +
> > +# Set 'CMP0069 NEW' behaviour for this project to support
> > +# compilers other than Intel Compiler and suppress cmake
> > +# warnings on the unset policy.
> > +cmake_policy(SET CMP0069 NEW)
> 
> Please describe what this policy is about, not only just what it
> is for.
> 

-# Set 'CMP0069 NEW' behaviour for this project to support
-# compilers other than Intel Compiler and suppress cmake
-# warnings on the unset policy.
+# 'CMP0069 NEW' behaviour enables LTO for compilers other then
+# Intel Compiler when CMAKE_INTERPROCEDURAL_OPTIMIZATION is
+# enabled and provides CheckIPOSupported module. We set the policy
+# to support LTO with GCC / Clang and to suppress cmake warnings
+# on the unset policy.

> > +
> > +# Retain 'CMP0069 NEW' behaviour after
> > +# 'cmake_minimum_required(VERSION ...) in subprojects to
> > +# avoid cmake warnings on the unset policy.
> > +set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
> 
> 
> -- 
> Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
> http://tarantool.io - www.twitter.com/kostja_osipov
> 




More information about the Tarantool-patches mailing list