mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
AMDGPU: Implement getLoadStoreVecRegBitWidth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed5a96fffb
commit
4dc595b198
@ -80,6 +80,28 @@ unsigned AMDGPUTTIImpl::getRegisterBitWidth(bool Vector) {
|
||||
return Vector ? 0 : 32;
|
||||
}
|
||||
|
||||
unsigned AMDGPUTTIImpl::getLoadStoreVecRegBitWidth(unsigned AddrSpace) {
|
||||
switch (AddrSpace) {
|
||||
case AMDGPUAS::GLOBAL_ADDRESS:
|
||||
case AMDGPUAS::CONSTANT_ADDRESS:
|
||||
case AMDGPUAS::FLAT_ADDRESS:
|
||||
return 128;
|
||||
case AMDGPUAS::LOCAL_ADDRESS:
|
||||
case AMDGPUAS::REGION_ADDRESS:
|
||||
return 64;
|
||||
case AMDGPUAS::PRIVATE_ADDRESS:
|
||||
return 8 * ST->getMaxPrivateElementSize();
|
||||
default:
|
||||
if (ST->getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS &&
|
||||
(AddrSpace == AMDGPUAS::PARAM_D_ADDRESS ||
|
||||
AddrSpace == AMDGPUAS::PARAM_I_ADDRESS ||
|
||||
(AddrSpace >= AMDGPUAS::CONSTANT_BUFFER_0 &&
|
||||
AddrSpace <= AMDGPUAS::CONSTANT_BUFFER_15)))
|
||||
return 128;
|
||||
llvm_unreachable("unhandled address space");
|
||||
}
|
||||
}
|
||||
|
||||
unsigned AMDGPUTTIImpl::getMaxInterleaveFactor(unsigned VF) {
|
||||
// Semi-arbitrary large amount.
|
||||
return 64;
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
|
||||
unsigned getNumberOfRegisters(bool Vector);
|
||||
unsigned getRegisterBitWidth(bool Vector);
|
||||
unsigned getLoadStoreVecRegBitWidth(unsigned AddrSpace);
|
||||
unsigned getMaxInterleaveFactor(unsigned VF);
|
||||
|
||||
int getArithmeticInstrCost(
|
||||
|
Loading…
Reference in New Issue
Block a user