[VENTUS][NFC] Remove dead code and refactor code

1. The variable NumRetVGPRs is not used;
2. According to the purpose of function numRegsForType, it is more suitable as
a public member function.
This commit is contained in:
Jules-Kong 2024-03-04 18:51:34 +08:00
parent ed93af0195
commit 1a04073d12
1 changed files with 4 additions and 5 deletions

View File

@ -11313,9 +11313,11 @@ private:
// Ventus GPGPU only support OpenCL C where non-kernel function passes
// non-private address space arguments in V0-V31, private address space in
// a0-a7, return value is passed back in V0-v15.
// a0-a7.
static const int NumArgGPRs = 32; // 32 VGPRS
static const int NumRetVGPRs = 16;
/// Estimate number of registers the type will use when passed in registers.
unsigned numRegsForType(QualType Ty) const;
public:
VentusRISCVABIInfo(CodeGen::CodeGenTypes &CGT, unsigned XLen)
@ -11328,9 +11330,6 @@ public:
ABIArgInfo classifyReturnType(QualType RetTy) const;
ABIArgInfo classifyKernelArgumentType(QualType Ty) const;
ABIArgInfo classifyArgumentType(QualType Ty, unsigned &NumRegsLeft) const;
/// Estimate number of registers the type will use when passed in registers.
unsigned numRegsForType(QualType Ty) const;
};
void VentusRISCVABIInfo::computeInfo(CGFunctionInfo &FI) const {