[PATCH] D98617: [AMDGPU, NFC] Refactor FP/BP spill index code in emitPrologue/emitEpilogue
Scott Linder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 15:51:29 PDT 2021
scott.linder added a comment.
This LGTM, thank you!
I have a few further suggestions while you are already cleaning things up. If you like them feel free to commit without updating the review.
================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1158
assert(!MFI.isDeadObjectIndex(FI));
- if (SpillFPToMemory) {
+ if (spilledToMemory(MF, *FPSaveIndex)) {
if (!ScratchExecCopy)
----------------
Can be `FI`
================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1183
+ if (BPSaveIndex) {
+ const int BasePtrFI = *BPSaveIndex;
assert(!MFI.isDeadObjectIndex(BasePtrFI));
----------------
I'd either change the `FI` above to `FramePointerFI` or change this `BasePtrFI` to `FI`. I'd lean towards the first choice, as I think the scope for the `if` gives enough context.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98617/new/
https://reviews.llvm.org/D98617
More information about the llvm-commits
mailing list