Callee-saved registers
D.Sturm
D.Sturm42 at gmail.com
Wed Sep 18 12:22:49 PDT 2013
I saw that AMD64 has some (dead) code there in the FrameContext, but for
large numbers of registers that can be pretty inefficient, especially for
smaller methods (the official ARM Aarch64 ABI specifies 20 callee-saved
registers, so that'd be a lot of possibly unnecessary save/restore.. and
also blow up the stack frame excessively).
I assume I could use caller-saved registers only (and make the easy
optimization for external calls to save only the necessary subset), but
with the large number of registers available that doesn't seem too
efficient, although with enough inlining it probably wouldn't matter too
much.
Would it be possible to insert a LIRNode in the prologue that stores all
callee-saved registers in an array with @Alive annotation and do the same
for all epilogue instructions? Wouldn't that cause the RegisterAllocator to
spill the registers if necessary?
-Daniel
More information about the graal-dev
mailing list