mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-18 08:00:02 +00:00
AMDGPU: Add subtarget feature for instruction rates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258085 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1095859c7b
commit
5fc0b0f07e
@ -59,6 +59,12 @@ def FeatureFastFMAF32 : SubtargetFeature<"fast-fmaf",
|
|||||||
"Assuming f32 fma is at least as fast as mul + add",
|
"Assuming f32 fma is at least as fast as mul + add",
|
||||||
[]>;
|
[]>;
|
||||||
|
|
||||||
|
def HalfRate64Ops : SubtargetFeature<"half-rate-64-ops",
|
||||||
|
"HalfRate64Ops",
|
||||||
|
"true",
|
||||||
|
"Most fp64 instructions are half rate instead of quarter",
|
||||||
|
[]>;
|
||||||
|
|
||||||
// Some instructions do not support denormals despite this flag. Using
|
// Some instructions do not support denormals despite this flag. Using
|
||||||
// fp32 denormals also causes instructions to run at the double
|
// fp32 denormals also causes instructions to run at the double
|
||||||
// precision rate for the device.
|
// precision rate for the device.
|
||||||
|
@ -70,11 +70,14 @@ AMDGPUSubtarget::AMDGPUSubtarget(const Triple &TT, StringRef GPU, StringRef FS,
|
|||||||
DumpCode(false), R600ALUInst(false), HasVertexCache(false),
|
DumpCode(false), R600ALUInst(false), HasVertexCache(false),
|
||||||
TexVTXClauseSize(0), Gen(AMDGPUSubtarget::R600), FP64(false),
|
TexVTXClauseSize(0), Gen(AMDGPUSubtarget::R600), FP64(false),
|
||||||
FP64Denormals(false), FP32Denormals(false), FastFMAF32(false),
|
FP64Denormals(false), FP32Denormals(false), FastFMAF32(false),
|
||||||
CaymanISA(false), FlatAddressSpace(false), FlatForGlobal(false),
|
HalfRate64Ops(false), CaymanISA(false), FlatAddressSpace(false),
|
||||||
EnableIRStructurizer(true), EnablePromoteAlloca(false), EnableIfCvt(true),
|
FlatForGlobal(false), EnableIRStructurizer(true),
|
||||||
EnableLoadStoreOpt(false), EnableUnsafeDSOffsetFolding(false),
|
EnablePromoteAlloca(false),
|
||||||
|
EnableIfCvt(true), EnableLoadStoreOpt(false),
|
||||||
|
EnableUnsafeDSOffsetFolding(false),
|
||||||
EnableXNACK(false),
|
EnableXNACK(false),
|
||||||
WavefrontSize(0), CFALUBug(false), LocalMemorySize(0),
|
WavefrontSize(0), CFALUBug(false),
|
||||||
|
LocalMemorySize(0),
|
||||||
EnableVGPRSpilling(false), SGPRInitBug(false), IsGCN(false),
|
EnableVGPRSpilling(false), SGPRInitBug(false), IsGCN(false),
|
||||||
GCN1Encoding(false), GCN3Encoding(false), CIInsts(false), LDSBankCount(0),
|
GCN1Encoding(false), GCN3Encoding(false), CIInsts(false), LDSBankCount(0),
|
||||||
IsaVersion(ISAVersion0_0_0), EnableHugeScratchBuffer(false),
|
IsaVersion(ISAVersion0_0_0), EnableHugeScratchBuffer(false),
|
||||||
|
@ -69,6 +69,7 @@ private:
|
|||||||
bool FP64Denormals;
|
bool FP64Denormals;
|
||||||
bool FP32Denormals;
|
bool FP32Denormals;
|
||||||
bool FastFMAF32;
|
bool FastFMAF32;
|
||||||
|
bool HalfRate64Ops;
|
||||||
bool CaymanISA;
|
bool CaymanISA;
|
||||||
bool FlatAddressSpace;
|
bool FlatAddressSpace;
|
||||||
bool FlatForGlobal;
|
bool FlatForGlobal;
|
||||||
@ -158,6 +159,10 @@ public:
|
|||||||
return FastFMAF32;
|
return FastFMAF32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasHalfRate64Ops() const {
|
||||||
|
return HalfRate64Ops;
|
||||||
|
}
|
||||||
|
|
||||||
bool hasFlatAddressSpace() const {
|
bool hasFlatAddressSpace() const {
|
||||||
return FlatAddressSpace;
|
return FlatAddressSpace;
|
||||||
}
|
}
|
||||||
|
@ -84,11 +84,11 @@ def : Proc<"cayman", R600_VLIW4_Itin,
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
def : ProcessorModel<"SI", SIFullSpeedModel,
|
def : ProcessorModel<"SI", SIFullSpeedModel,
|
||||||
[FeatureSouthernIslands, FeatureFastFMAF32]
|
[FeatureSouthernIslands, FeatureFastFMAF32, HalfRate64Ops]
|
||||||
>;
|
>;
|
||||||
|
|
||||||
def : ProcessorModel<"tahiti", SIFullSpeedModel,
|
def : ProcessorModel<"tahiti", SIFullSpeedModel,
|
||||||
[FeatureSouthernIslands, FeatureFastFMAF32]
|
[FeatureSouthernIslands, FeatureFastFMAF32, HalfRate64Ops]
|
||||||
>;
|
>;
|
||||||
|
|
||||||
def : ProcessorModel<"pitcairn", SIQuarterSpeedModel, [FeatureSouthernIslands]>;
|
def : ProcessorModel<"pitcairn", SIQuarterSpeedModel, [FeatureSouthernIslands]>;
|
||||||
@ -116,8 +116,8 @@ def : ProcessorModel<"kaveri", SIQuarterSpeedModel,
|
|||||||
>;
|
>;
|
||||||
|
|
||||||
def : ProcessorModel<"hawaii", SIFullSpeedModel,
|
def : ProcessorModel<"hawaii", SIFullSpeedModel,
|
||||||
[FeatureSeaIslands, FeatureFastFMAF32, FeatureLDSBankCount32,
|
[FeatureSeaIslands, FeatureFastFMAF32, HalfRate64Ops,
|
||||||
FeatureISAVersion7_0_1]
|
FeatureLDSBankCount32, FeatureISAVersion7_0_1]
|
||||||
>;
|
>;
|
||||||
|
|
||||||
def : ProcessorModel<"mullins", SIQuarterSpeedModel,
|
def : ProcessorModel<"mullins", SIQuarterSpeedModel,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user