Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Thu, 27 Feb 2025 12:22:36 +0000
>> From: Pip Cet <pipcet@protonmail.com>
>> Cc: Po Lu <luangruo@yahoo.com>, marian.iurie@gmail.com,
>> michael.albinus@gmx.de, iura.mail@gmail.com, 76559@debbugs.gnu.org,
>> Stefan Kangas <stefankangas@gmail.com>, Paul Eggert
>> <eggert@cs.ucla.edu>
>>
>> "Eli Zaretskii" <eliz@gnu.org> writes:
>>
>> > I believe we should recommend against using -O3. Too many bad bugs
>>
>> If we do that, can we include link time optimization in that? I find
>> LTO'd code extremely difficult to read, since things like the calling
>> convention no longer apply (even when a function call isn't inlined, LTO
>> can still conclude that some registers survive the call and reuse them
>> even though the calling convention disagrees).
It's marginally easier to read the RTL (which ultimately becomes no more
than a Lisp-like representation of the assembly but with some tree
expressions and analogous details preserved for reference,
e.g. non-inlined procedure calls).
> Maybe we should also recommend against LTO. Paul, WDYT about this?
I think there is no occasion to compile Emacs with any optimization
options besides -O2.