mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
R600: Implement a few simple TTI queries.
I'm not sure if these have any effect right now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4df656952a
commit
fd22980d6b
@ -79,6 +79,10 @@ public:
|
||||
|
||||
PopcntSupportKind getPopcntSupport(unsigned IntTyWidthInBit) const override;
|
||||
|
||||
unsigned getNumberOfRegisters(bool Vector) const override;
|
||||
unsigned getRegisterBitWidth(bool Vector) const override;
|
||||
unsigned getMaximumUnrollFactor() const override;
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
||||
@ -127,3 +131,23 @@ AMDGPUTTI::getPopcntSupport(unsigned TyWidth) const {
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user