AOT code usage restrictions

Andrew Haley aph-open at littlepinkcloud.com
Fri Jan 23 21:35:42 UTC 2026


On 1/23/26 7:30 PM, Vladimir Kozlov wrote:

> I just want to point out that using generic instructions in AOT code
> (AOTed adapters, stubs, nmethods) in deployment will force new JITed
> code also use generic instructions. That is it - VM runtime (stack
> walking, deoptimization, registers saving) requires generated code
> (JITed and AOTed) to use the same set of instructions and registers.

I hear you, but not entirely. Sure, we'll have to use the smaller 
register sets in some cases, but there's nothing to stop us from using a 
lot of newer instructions that run faster.

I'm perhaps a bit biased here because AArch64, being newer, doesn't have 
quite the same diversity of features as x86. And, with the exception of 
a little bit of code that can use the extended SVE register set, we 
don't have to worry about register file sizes there either.

> As result we may not reach peak performance on modern machines which we
> will get when running without such AOT code.

That's entirely true.

> I did not measure difference in peak performance. But even if it is
> "small" for some our customers it will be showstopper.
> The cases 1. and 2. will work better for them.

Right, so that's the difference between GCC default and -march=native.

> When you said x86-64 do you mean SSE2 (default fro 64 bits), AVX0 or AVX2?

SSE2.

Andrew.



More information about the leyden-dev mailing list