[PATCH] D91110: [AMDGPU] Remove scratch rsrc from spill pseudos
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 10:05:12 PST 2020
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:1391-1393
+ if (Register ScratchRSrcReg = MFI->getScratchRSrcReg()) {
+ MIB.addReg(ScratchRSrcReg, RegState::Implicit);
+ }
----------------
rampitec wrote:
> arsenm wrote:
> > I don't see why this would be conditional, or why this would need to be added
> It is conditional because I do not want to add "implicit $noreg" in case of flat scratch.
> It is needed because SIFrameLowering::getEntryFunctionReservedScratchRsrcReg() does that:
>
>
> ```
> if (!ScratchRsrcReg || !MRI.isPhysRegUsed(ScratchRsrcReg))
> return Register();
> ```
>
> I.e. if register is unused it will not be initialized.
I think we can remove this check and replace it with a check for stack objects now. In the spill case it should have always been redundant
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91110/new/
https://reviews.llvm.org/D91110
More information about the llvm-commits
mailing list