A New Approach to Callee-Saved Registers in LLVM
- Track: LLVM
- Room: K.3.201
- Day: Saturday
- Start: 10:35
- End: 11:00
- Video only: k3201
- Chat: Join the conversation!
Currently LLVM saves and restores callee-saved registers during prologue-epilogue insertion pass. I would like to present a new approach where we expose callee-saved register constraints early in the backend pipeline. This creates more opportunities for the optimizers and gives good performance gains. Interestingly, we achieve per-register shrink-wrapping for free. However, this makes emission of CFI directives much more complicated. I am currently in the process of upstreaming this work. The proof-of-concept branch is publicly available here: https://github.com/llvm/llvm-project/pull/90819 I have only tried this approach on RISCV, but it could be applied to other targets as well.
Speakers
Mikhail Gudim |