[PATCH] D114652: [AMDGPU] Move call clobbered return address registers s[30:31] to callee saved range
Venkata Ramanaiah Nalamothu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 8 02:39:17 PST 2022
RamNalamothu marked 2 inline comments as done.
RamNalamothu added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1351
+ // does not use CSR list, the clobbering of return address by function calls
+ // (D117243) or otherwise (D120922) is ignored/not seen by the IPRA's register
+ // usage collection. This will ensure save/restore of return address happens
----------------
arsenm wrote:
> Referring to phabricator reviews in a comment is weird
I have seen this in many places of clang/llvm and in fact in AMDGPU's source/tests as well. But if you say this is not a recommended practice, I will remove those references while landing the patch.
================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1359
+ if (!MFI->isEntryFunction() &&
+ (FrameInfo.hasCalls() || MRI.isPhysRegModified(RAReg_sub0) ||
+ MRI.isPhysRegModified(RAReg_sub1))) {
----------------
arsenm wrote:
> Can just directly check isPhysRegModified(RetAddrReg)
Fixed. Thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114652/new/
https://reviews.llvm.org/D114652
More information about the llvm-commits
mailing list