[PATCH] R600: Implement a few simple TTI queries.
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Jul 18 12:05:23 PDT 2014
I'm not sure if these have any effect right now.
http://reviews.llvm.org/D4586
Files:
lib/Target/R600/AMDGPUTargetTransformInfo.cpp
Index: lib/Target/R600/AMDGPUTargetTransformInfo.cpp
===================================================================
--- lib/Target/R600/AMDGPUTargetTransformInfo.cpp
+++ lib/Target/R600/AMDGPUTargetTransformInfo.cpp
@@ -91,6 +91,10 @@
PopcntSupportKind getPopcntSupport(unsigned IntTyWidthInBit) const override;
+ unsigned getNumberOfRegisters(bool Vector) const override;
+ unsigned getRegisterBitWidth(bool Vector) const override;
+ unsigned getMaximumUnrollFactor() const override;
+
/// @}
};
@@ -162,3 +166,23 @@
assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
return ST->hasBCNT(TyWidth) ? PSK_FastHardware : PSK_Software;
}
+
+unsigned AMDGPUTTI::getNumberOfRegisters(bool Vec) const {
+ if (Vec)
+ return 0;
+
+ // Number of VGPRs on SI.
+ if (ST->getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS)
+ return 256;
+
+ return 4 * 128; // XXX - 4 channels. Should these count as vector instead?
+}
+
+unsigned AMDGPUTTI::getRegisterBitWidth(bool) const {
+ return 32;
+}
+
+unsigned AMDGPUTTI::getMaximumUnrollFactor() const {
+ // Semi-arbitrary large amount.
+ return 64;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4586.11656.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140718/d0764733/attachment.bin>
More information about the llvm-commits
mailing list