From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4D64722676 for ; Tue, 15 May 2018 07:11:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jpHHMhlYGP_I for ; Tue, 15 May 2018 07:11:16 -0400 (EDT) Received: from smtp14.mail.ru (smtp14.mail.ru [94.100.181.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 0AF5E22606 for ; Tue, 15 May 2018 07:11:15 -0400 (EDT) Date: Tue, 15 May 2018 14:11:28 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH] Add LTO support Message-ID: <20180515111128.sxythzpmmw4sg6td@tkn_work_nb> References: <20180515102328.11908-1-avkhatskevich@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180515102328.11908-1-avkhatskevich@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Alex Khatskevich Cc: tarantool-patches@freelists.org Hi, Alex! My comments are below. WBR, Alexander Turenko. On Tue, May 15, 2018 at 01:23:28PM +0300, AKhatskevich wrote: > Changes: > - update submodules (fix lto-related warnings) > - add `TARANTOOL_LTO` cmake option (by default it is `True` only for > non-Debug builds) > Don't remember any discussions re enabling this by default. Is it Kirill or Kostya decision? > LTO speeds up cpu-intensive workloads by up to 20%. > Requirements for LTO enabling: > - cmake >= 3.9 > - linker > - ld >= 2.31 (or latest 2.30) > - gold >= 1.15 (binutils 2.30) > This small patch required fixing bug in GNU ld linker. If you menting the bug here, so add the link. > +# Tarantool uses both dynamic-list and lto link options, which works only > +# since binutils: > +# - 2.30 for linking with gold (gold version is 1.15) > +# - last 2.30 or 2.31 in case of ld (dbf) > +# (ld was fixed expecially for Tarantool, > +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84901) > + dbf -> bfd 'Expecially' is 'especially'? I feel that as the boast in not appropriate place. > + if (NOT linker_version VERSION_LESS "2.31") > + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) Strange indent. It seems that you mix tabs and spaces within that file. > + elseif(NOT linker_version VERSION_LESS "2.30") > + # Use gold if LTO+dynamic-list is available in gold & not in ld > + find_program(gold_available "ld.gold") > + if (gold_available) > + message(WARNING "Use gold linker (to enable LTO)") > + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") > + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) Indent.