From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <274063c8-2d2d-4d4d-24e2-634fc056c61d@basealt.ru> Date: Sat, 25 Sep 2021 11:35:33 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Content-Language: ru To: devel@lists.altlinux.org References: <5e02589a-cca7-c258-022d-c154d0e3cf99@basealt.ru> <20210924151804.GA13293@altlinux.org> <20210924200459.59b232ea8aff745989784d27@altlinux.org> <20210924182936.GA15555@altlinux.org> From: Anton Farygin Organization: BaseALT In-Reply-To: <20210924182936.GA15555@altlinux.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [devel] I: gcc 11.2.1 && binutils 2.37 X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2021 08:35:34 -0000 Archived-At: List-Archive: List-Post: On 24.09.2021 21:29, Dmitry V. Levin wrote: > On Fri, Sep 24, 2021 at 08:04:59PM +0300, Andrey Savchenko wrote: >> On Fri, 24 Sep 2021 18:18:04 +0300 Dmitry V. Levin wrote: >>> On Fri, Sep 24, 2021 at 08:48:12AM +0300, Anton Farygin wrote: >>>> Да, Илья. >>>> >>>> Есть ещё вот такая статья годичной давности: >>>> https://johnysswlab.com/link-time-optimizations-new-way-to-do-compiler-optimizations/ >>>> >>>> и там интересная заметка про ffmpeg, в которой говорится о том, что >>>> выигрыш в сборке с LTO может быть нулевым. >>> Особенно если в случае LTO ещё и выключить в пакете часть ассемблерных >>> оптимизаций. >> Если ты внимательно читал статью, то там и в тесте без LTO они >> оставались выключенными. А вообще, тот факт, что ради LTO >> приходится отключать сильные оптимизации > Не надо ради LTO отключать сильные оптимизации. > Странно, что в ffmpeg так сделали. Всё что сделали в ffmpeg для LTO звучит вот так:     /* When direct symbol references are used in code passed to a compiler that does not support them      *  then these references need to be converted to named asm constraints instead.      * Instead of returning a direct symbol MANGLE now returns a named constraint for that specific symbol.      * In order for this to work there must also be a corresponding entry in the asm-interface. To add this      *  entry use the macro NAMED_CONSTRAINTS() and pass in a list of each symbol reference used in the      *  corresponding block of code. (e.g. NAMED_CONSTRAINTS(var1,var2,var3) where var1 is the first symbol etc. ).      * If there are already existing constraints then use NAMED_CONSTRAINTS_ADD to add to the existing constraint list.      */ Сложно оценить, какая деградация производительности будет в этом месте, но то что она будет - это 100%. > > Вообще статья действительно старая в том смысле, что оперирует старыми > версиями: gcc8 отстаёт от gcc11 на 3 года. Гораздо интереснее было бы > увидеть результаты по текущей версии. Да, мне тоже было бы интересно это увидеть. Если найду время - посмотрю.