[llvm] r253724 - Power8 and later support fusing addis/addi and addis/ld instruction
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 14:38:20 PST 2015
Author: echristo
Date: Fri Nov 20 16:38:20 2015
New Revision: 253724
URL: http://llvm.org/viewvc/llvm-project?rev=253724&view=rev
Log:
Power8 and later support fusing addis/addi and addis/ld instruction
pairs that use the same register to execute as a single instruction.
No Functional Change
Patch by Kyle Butt!
Modified:
llvm/trunk/lib/Target/PowerPC/PPC.td
llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
Modified: llvm/trunk/lib/Target/PowerPC/PPC.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPC.td?rev=253724&r1=253723&r2=253724&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPC.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPC.td Fri Nov 20 16:38:20 2015
@@ -137,6 +137,8 @@ def FeatureHTM : SubtargetFeature<"htm",
"Enable Hardware Transactional Memory instructions">;
def FeatureMFTB : SubtargetFeature<"", "FeatureMFTB", "true",
"Implement mftb using the mfspr instruction">;
+def FeatureFusion : SubtargetFeature<"fusion", "HasFusion", "true",
+ "Target supports add/load integer fusion.">;
def DeprecatedDST : SubtargetFeature<"", "DeprecatedDST", "true",
"Treat vector data stream cache control instructions as deprecated">;
@@ -168,7 +170,8 @@ def ProcessorFeatures {
FeatureMFTB, DeprecatedDST];
list<SubtargetFeature> Power8SpecificFeatures =
[DirectivePwr8, FeatureP8Altivec, FeatureP8Vector, FeatureP8Crypto,
- FeatureHTM, FeatureDirectMove, FeatureICBT, FeaturePartwordAtomic];
+ FeatureHTM, FeatureDirectMove, FeatureICBT, FeaturePartwordAtomic,
+ FeatureFusion];
list<SubtargetFeature> Power8FeatureList =
!listconcat(Power7FeatureList, Power8SpecificFeatures);
}
Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp?rev=253724&r1=253723&r2=253724&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp Fri Nov 20 16:38:20 2015
@@ -100,6 +100,7 @@ void PPCSubtarget::initializeEnvironment
HasDirectMove = false;
IsQPXStackUnaligned = false;
HasHTM = false;
+ HasFusion = false;
}
void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h?rev=253724&r1=253723&r2=253724&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h Fri Nov 20 16:38:20 2015
@@ -119,6 +119,7 @@ protected:
bool HasPartwordAtomics;
bool HasDirectMove;
bool HasHTM;
+ bool HasFusion;
/// When targeting QPX running a stock PPC64 Linux kernel where the stack
/// alignment has not been changed, we need to keep the 16-byte alignment
@@ -254,6 +255,7 @@ public:
return 16;
}
bool hasHTM() const { return HasHTM; }
+ bool hasFusion() const { return HasFusion; }
const Triple &getTargetTriple() const { return TargetTriple; }
More information about the llvm-commits
mailing list