You are viewing the 2025 edition of FOSDEM. Click here to view the 2026 edition
A New Approach to Callee-Saved Registers in LLVM
K.3.201 | Day 1 | 10:35 - 11:00 | Speakers: Mikhail Gudim
A New Approach to Callee-Saved Registers in LLVM
Abstract
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
Links
External Links
Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.
