Open
Description
Machine Outliner can lead to significant size savings, even for 32-bit embedded targets, see https://www.linaro.org/blog/reducing-code-size-with-llvm-machine-outliner-on-32-bit-arm-targets/
Both Arm and AArch64 backends support variety of outlining strategies:
llvm-project/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Lines 8099 to 8178 in 89c95ef
While the RISC-V backend has some outlining support, it's fairly limited compared to Arm and AArch64 backends, see
llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Lines 2533 to 2570 in 89c95ef
We should improve the RISC-V Machine Outliner to be on par with Arm and AArch64.
Off the top of my head we should take the following steps:
- Perform Gap analysis between the ARM and RISC-V machine outliners
- Discuss the findings with RISC-V backend maintainers: @topperc @preames @MaskRay @asb @jrtc27
- Create a design implementation plan to improve support
- Implement improved support upstream
CC: @petrhosek