diff options
| author | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2018-02-20 23:30:21 +0000 |
|---|---|---|
| committer | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2018-02-20 23:30:21 +0000 |
| commit | 5c1237a1fd94243b7cf7bcd7cb85619977ceaf03 (patch) | |
| tree | 8da30148e22a990451c249fa6f243c6e2fa48c4f /llvm/lib | |
| parent | 3e569ac0cc711d8a9c7271243711f41dbb93d945 (diff) | |
| download | bcm5719-llvm-5c1237a1fd94243b7cf7bcd7cb85619977ceaf03.tar.gz bcm5719-llvm-5c1237a1fd94243b7cf7bcd7cb85619977ceaf03.zip | |
Revert "[AMDGPU] Increased vector length for global/constant loads."
https://reviews.llvm.org/rL325518
It breaks following OpenCL conformance tests:
- Basic - parameter_types
- Basic - vload_private
llvm-svn: 325643
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | 30 | ||||
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h | 6 |
2 files changed, 2 insertions, 34 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp index f478ffbc511..00ff0308ba1 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp @@ -233,38 +233,12 @@ unsigned AMDGPUTTIImpl::getMinVectorRegisterBitWidth() const { return 32; } -unsigned AMDGPUTTIImpl::getLoadVectorFactor(unsigned VF, unsigned LoadSize, - unsigned ChainSizeInBytes, - VectorType *VecTy) const { - unsigned VecRegBitWidth = VF * LoadSize; - if (VecRegBitWidth > 128 && VecTy->getScalarSizeInBits() < 32) - // TODO: Support element-size less than 32bit? - return 128 / LoadSize; - - return VF; -} - -unsigned AMDGPUTTIImpl::getStoreVectorFactor(unsigned VF, unsigned StoreSize, - unsigned ChainSizeInBytes, - VectorType *VecTy) const { - unsigned VecRegBitWidth = VF * StoreSize; - if (VecRegBitWidth > 128) - return 128 / StoreSize; - - return VF; -} - unsigned AMDGPUTTIImpl::getLoadStoreVecRegBitWidth(unsigned AddrSpace) const { AMDGPUAS AS = ST->getAMDGPUAS(); if (AddrSpace == AS.GLOBAL_ADDRESS || AddrSpace == AS.CONSTANT_ADDRESS || - AddrSpace == AS.CONSTANT_ADDRESS_32BIT) { - if (ST->getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS) - return 128; - return 512; - } - - if (AddrSpace == AS.FLAT_ADDRESS) + AddrSpace == AS.CONSTANT_ADDRESS_32BIT || + AddrSpace == AS.FLAT_ADDRESS) return 128; if (AddrSpace == AS.LOCAL_ADDRESS || AddrSpace == AS.REGION_ADDRESS) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h index a112757173d..8899d2c6da8 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h @@ -118,12 +118,6 @@ public: unsigned getNumberOfRegisters(bool Vector) const; unsigned getRegisterBitWidth(bool Vector) const; unsigned getMinVectorRegisterBitWidth() const; - unsigned getLoadVectorFactor(unsigned VF, unsigned LoadSize, - unsigned ChainSizeInBytes, - VectorType *VecTy) const; - unsigned getStoreVectorFactor(unsigned VF, unsigned StoreSize, - unsigned ChainSizeInBytes, - VectorType *VecTy) const; unsigned getLoadStoreVecRegBitWidth(unsigned AddrSpace) const; bool isLegalToVectorizeMemChain(unsigned ChainSizeInBytes, |

