Outline chunks of code which need to save and restore the link register when a spare register can be used to it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | ||
---|---|---|
5653 | Is PC already covered by getReservedRegs or do we need to check here too? Also do you mean tGPR? That seems too restrictive for Thumb2. I think it would be better, easier and safer to just use the rGPR for both. |
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | ||
---|---|---|
5653 | Yes PC is marked as reserved by getReservedRegs, but you're right rGPR is a much better choice |
I just run some numbers on the test suite and the results are already looking very good with 1.4% geomean reduction for T32, so many thanks! Is this the final patch of the set?
Thanks :)
No there is 3 more patches in the set, one for the default mode (save/restore of lr on the stack), one which will add the support of calls in the outlined regions and the most tricky one which will fixup the stack to handle load/store. In the end we should reach ~3% of size reduction in T32 and ~5% in ARM (this is what I observed on average for various benchs).
So, I'll submit the next 2 patches in the coming days and the last one might take a bit longer to be reabased and validated, but will be out soon.
Thanks for the reviews!
Is PC already covered by getReservedRegs or do we need to check here too? Also do you mean tGPR? That seems too restrictive for Thumb2. I think it would be better, easier and safer to just use the rGPR for both.