forked from OSchip/llvm-project
[AArch64] Enable aggressive FMA on T99 and provide AArch64 options for others.
This patch enables aggressive FMA by default on T99, and provides a -mllvm option to enable the same on other AArch64 micro-arch's (-mllvm -aarch64-enable-aggressive-fma). Test case demonstrating the effects on T99 is included. Patch by: steleman (Stefan Teleman) Differential Revision: https://reviews.llvm.org/D40696 llvm-svn: 323474
This commit is contained in:
parent
2d05fe5f91
commit
0715092c65
|
@ -149,6 +149,12 @@ def FeatureLSLFast : SubtargetFeature<
|
|||
"lsl-fast", "HasLSLFast", "true",
|
||||
"CPU has a fastpath logical shift of up to 3 places">;
|
||||
|
||||
def FeatureAggressiveFMA :
|
||||
SubtargetFeature<"aggressive-fma",
|
||||
"HasAggressiveFMA",
|
||||
"true",
|
||||
"Enable Aggressive FMA for floating-point.">;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Architectures.
|
||||
//
|
||||
|
@ -390,6 +396,7 @@ def ProcSaphira : SubtargetFeature<"saphira", "ARMProcFamily", "Saphira",
|
|||
def ProcThunderX2T99 : SubtargetFeature<"thunderx2t99", "ARMProcFamily",
|
||||
"ThunderX2T99",
|
||||
"Cavium ThunderX2 processors", [
|
||||
FeatureAggressiveFMA,
|
||||
FeatureCRC,
|
||||
FeatureCrypto,
|
||||
FeatureFPARMv8,
|
||||
|
|
|
@ -10982,6 +10982,10 @@ bool AArch64TargetLowering::isIntDivCheap(EVT VT, AttributeList Attr) const {
|
|||
return OptSize && !VT.isVector();
|
||||
}
|
||||
|
||||
bool AArch64TargetLowering::enableAggressiveFMAFusion(EVT VT) const {
|
||||
return Subtarget->hasAggressiveFMA() && VT.isFloatingPoint();
|
||||
}
|
||||
|
||||
unsigned
|
||||
AArch64TargetLowering::getVaListSizeInBits(const DataLayout &DL) const {
|
||||
if (Subtarget->isTargetDarwin() || Subtarget->isTargetWindows())
|
||||
|
|
|
@ -456,6 +456,9 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
/// Enable aggressive FMA fusion on targets that want it.
|
||||
bool enableAggressiveFMAFusion(EVT VT) const override;
|
||||
|
||||
/// Returns the size of the platform's va_list object.
|
||||
unsigned getVaListSizeInBits(const DataLayout &DL) const override;
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ protected:
|
|||
bool HasLSLFast = false;
|
||||
bool HasSVE = false;
|
||||
bool HasRCPC = false;
|
||||
bool HasAggressiveFMA = false;
|
||||
|
||||
// HasZeroCycleRegMove - Has zero-cycle register mov instructions.
|
||||
bool HasZeroCycleRegMove = false;
|
||||
|
@ -269,6 +270,7 @@ public:
|
|||
bool hasLSLFast() const { return HasLSLFast; }
|
||||
bool hasSVE() const { return HasSVE; }
|
||||
bool hasRCPC() const { return HasRCPC; }
|
||||
bool hasAggressiveFMA() const { return HasAggressiveFMA; }
|
||||
|
||||
bool isLittleEndian() const { return IsLittle; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue