RFR: 8347901: C2 should remove unused leaf / pure runtime calls

Vladimir Ivanov vlivanov at openjdk.org
Mon May 12 21:04:58 UTC 2025


On Sat, 10 May 2025 05:24:02 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> I think a very simple approach you can take is having CallPureNode as a pure data node

It's not as simple as it seems. In order to work reliably it requires full control of the code being called, so without extra work it is appropriate for generated stubs only. If you want to call some native code VM doesn't control, then either all caller-saved registers should be preserved across the call (which may be prohibitively expensive) or it should be made explicit there's a call taking place so all ABI effects are taken into account.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24966#issuecomment-2874057369


More information about the hotspot-compiler-dev mailing list