summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCSubtarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h
index 50d89390d5bc..e916b0c02000 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.h
+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h
@@ -112,6 +112,8 @@ protected:
bool HasPrefixInstrs;
bool HasPCRelativeMemops;
bool HasMMA;
+ bool HasROPProtect;
+ bool HasPrivileged;
bool HasFCPSGN;
bool HasFSQRT;
bool HasFRE, HasFRES, HasFRSQRTE, HasFRSQRTES;
@@ -137,6 +139,7 @@ protected:
bool HasICBT;
bool HasInvariantFunctionDescriptors;
bool HasPartwordAtomics;
+ bool HasQuadwordAtomics;
bool HasDirectMove;
bool HasHTM;
bool HasFloat128;
@@ -144,6 +147,7 @@ protected:
bool HasStoreFusion;
bool HasAddiLoadFusion;
bool HasAddisLoadFusion;
+ bool IsISA2_07;
bool IsISA3_0;
bool IsISA3_1;
bool UseLongCalls;
@@ -273,6 +277,8 @@ public:
bool hasPrefixInstrs() const { return HasPrefixInstrs; }
bool hasPCRelativeMemops() const { return HasPCRelativeMemops; }
bool hasMMA() const { return HasMMA; }
+ bool hasROPProtect() const { return HasROPProtect; }
+ bool hasPrivileged() const { return HasPrivileged; }
bool pairedVectorMemops() const { return PairedVectorMemops; }
bool hasMFOCRF() const { return HasMFOCRF; }
bool hasISEL() const { return HasISEL; }
@@ -297,6 +303,7 @@ public:
bool usePPCPreRASchedStrategy() const { return UsePPCPreRASchedStrategy; }
bool usePPCPostRASchedStrategy() const { return UsePPCPostRASchedStrategy; }
bool hasPartwordAtomics() const { return HasPartwordAtomics; }
+ bool hasQuadwordAtomics() const { return HasQuadwordAtomics; }
bool hasDirectMove() const { return HasDirectMove; }
Align getPlatformStackAlignment() const {
@@ -315,6 +322,7 @@ public:
bool hasHTM() const { return HasHTM; }
bool hasFloat128() const { return HasFloat128; }
+ bool isISA2_07() const { return IsISA2_07; }
bool isISA3_0() const { return IsISA3_0; }
bool isISA3_1() const { return IsISA3_1; }
bool useLongCalls() const { return UseLongCalls; }
@@ -407,6 +415,16 @@ public:
return PredictableSelectIsExpensive;
}
+ // Select allocation orders of GPRC and G8RC. It should be strictly consistent
+ // with corresponding AltOrders in PPCRegisterInfo.td.
+ unsigned getGPRAllocationOrderIdx() const {
+ if (is64BitELFABI())
+ return 1;
+ if (isAIXABI())
+ return 2;
+ return 0;
+ }
+
// GlobalISEL
const CallLowering *getCallLowering() const override;
const RegisterBankInfo *getRegBankInfo() const override;