mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
AMDGPU: Error if too many user SGPRs used
llvm-svn: 254332
This commit is contained in:
parent
08cdb00306
commit
3cec06fabe
@ -401,6 +401,11 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
|
||||
ProgInfo.NumSGPR = AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG;
|
||||
}
|
||||
|
||||
if (MFI->NumUserSGPRs > STM.getMaxNumUserSGPRs()) {
|
||||
LLVMContext &Ctx = MF.getFunction()->getContext();
|
||||
Ctx.emitError("too many user SGPRs used");
|
||||
}
|
||||
|
||||
ProgInfo.VGPRBlocks = (ProgInfo.NumVGPR - 1) / 4;
|
||||
ProgInfo.SGPRBlocks = (ProgInfo.NumSGPR - 1) / 8;
|
||||
// Set the value to initialize FP_ROUND and FP_DENORM parts of the mode
|
||||
|
@ -303,6 +303,9 @@ public:
|
||||
return isAmdHsaOS() ? 0 : 36;
|
||||
}
|
||||
|
||||
unsigned getMaxNumUserSGPRs() const {
|
||||
return 16;
|
||||
}
|
||||
};
|
||||
|
||||
} // End namespace llvm
|
||||
|
Loading…
Reference in New Issue
Block a user