This patch allows the register allocator to spill SVE registers to the stack.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
2960 | I'd prefer to refactor the code so it doesn't depend on what getSpillSize returns for SVE types. |
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
2960 | The SVE case is actually outside the switch statement and is therefore independent of what getSpillSize returns. The switch statement seems to be there purely for having a quicker look-up as opposed to having a long if-elseif-elseif-[..]-elseif chain. Do you want me to change that? |
LGTM
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
2960 | Oh, I didn't read the code in the switch that carefully. I guess it only triggers for specific register classes, so it doesn't matter what getSpillSize() returns as long as it doesn't crash. I guess that's okay. | |
3048 | We'll eventually need to handle ZPR2 etc.? I guess we don't need that immediately. |
Thanks for the review!
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | ||
---|---|---|
3048 | Correct! We can implement this with Pseudos that expand to individual LDR_ZXI/STR_ZXI instructions. |
I'd prefer to refactor the code so it doesn't depend on what getSpillSize returns for SVE types.