[llvm] [AMDGPU][GlobalISel] Enable kernel argument preloading (PR #134655)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 07:05:18 PDT 2025
================
@@ -497,6 +499,66 @@ static void allocateHSAUserSGPRs(CCState &CCInfo,
// these from the dispatch pointer.
}
+void AMDGPUCallLowering::lowerPreloadedParameter(
+ MachineIRBuilder &B, ArrayRef<Register> VRegs, Type *ArgTy,
+ uint64_t ArgOffset, Align Alignment,
+ ArrayRef<MCRegister> PreloadRegs) const {
+ MachineFunction &MF = B.getMF();
+ const GCNSubtarget *Subtarget = &MF.getSubtarget<GCNSubtarget>();
+ MachineRegisterInfo &MRI = MF.getRegInfo();
+ const SIRegisterInfo *TRI = Subtarget->getRegisterInfo();
+ const DataLayout &DL = B.getDataLayout();
+
+ LLT ResTy = getLLTForType(*ArgTy, DL);
+ LLT ScalarTy = LLT::scalar(DL.getTypeSizeInBits(ArgTy));
----------------
arsenm wrote:
There's a bunch of code to go from IR type to register type, which most calling convention code should be operating in terms of, not the original IR type (i.e. what's in CCValAssign and ISD::InputArg)
https://github.com/llvm/llvm-project/pull/134655
More information about the llvm-commits
mailing list