On Thu, 14 Nov 2024 07:55:46 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> There are quite a number of things in HotSpot that seemingly wouldn't work >> with LTO enabled. One notable example is os::current_stack_pointer, which on >> many platforms simply returns the frame pointer of os::current_stack_pointer >> or the address of a local inside os::current_stack_pointer. With LTO enabled >> this becomes eligible for inlining, and the "stack pointer" ends up becoming >> the frame pointer of the caller, which is not correct. Fixing these issues >> and making LTO viable is one of the things I hope to do, although not now > > Hmmm ... I thought we had LTO enabled in the past for Java SE Embedded ... > And not under the rubric of a warnings fix. Maybe the title is a bit misleading, it is more about a build fix (lto build did not work for me with gcc 11.3.0; with this fix it works). If the lot stuff is broken and there is no intent to fix it, we might consider removing it (but fixing it would probably be better). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22069#discussion_r1841823518