diff options
Diffstat (limited to 'contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r-- | contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h b/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h index 4f5c95c1483f..9fe286a3b7a9 100644 --- a/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h +++ b/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h @@ -18,9 +18,9 @@ #include "PPCISelLowering.h" #include "PPCInstrInfo.h" #include "llvm/ADT/Triple.h" +#include "llvm/CodeGen/SelectionDAGTargetInfo.h" #include "llvm/IR/DataLayout.h" #include "llvm/MC/MCInstrItineraries.h" -#include "llvm/Target/TargetSelectionDAGInfo.h" #include "llvm/Target/TargetSubtargetInfo.h" #include <string> @@ -56,6 +56,7 @@ namespace PPC { DIR_PWR6X, DIR_PWR7, DIR_PWR8, + DIR_PWR9, DIR_64 }; } @@ -64,6 +65,13 @@ class GlobalValue; class TargetMachine; class PPCSubtarget : public PPCGenSubtargetInfo { +public: + enum POPCNTDKind { + POPCNTD_Unavailable, + POPCNTD_Slow, + POPCNTD_Fast + }; + protected: /// TargetTriple - What processor and OS we're targeting. Triple TargetTriple; @@ -92,6 +100,8 @@ protected: bool HasP8Vector; bool HasP8Altivec; bool HasP8Crypto; + bool HasP9Vector; + bool HasP9Altivec; bool HasFCPSGN; bool HasFSQRT; bool HasFRE, HasFRES, HasFRSQRTE, HasFRSQRTES; @@ -101,7 +111,6 @@ protected: bool HasFPRND; bool HasFPCVT; bool HasISEL; - bool HasPOPCNTD; bool HasBPERMD; bool HasExtDiv; bool HasCMPB; @@ -122,6 +131,9 @@ protected: bool HasHTM; bool HasFusion; bool HasFloat128; + bool IsISA3_0; + + POPCNTDKind HasPOPCNTD; /// 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 @@ -132,7 +144,7 @@ protected: PPCFrameLowering FrameLowering; PPCInstrInfo InstrInfo; PPCTargetLowering TLInfo; - TargetSelectionDAGInfo TSInfo; + SelectionDAGTargetInfo TSInfo; public: /// This constructor initializes the data members to match that @@ -167,7 +179,7 @@ public: const PPCTargetLowering *getTargetLowering() const override { return &TLInfo; } - const TargetSelectionDAGInfo *getSelectionDAGInfo() const override { + const SelectionDAGTargetInfo *getSelectionDAGInfo() const override { return &TSInfo; } const PPCRegisterInfo *getRegisterInfo() const override { @@ -230,9 +242,10 @@ public: bool hasP8Vector() const { return HasP8Vector; } bool hasP8Altivec() const { return HasP8Altivec; } bool hasP8Crypto() const { return HasP8Crypto; } + bool hasP9Vector() const { return HasP9Vector; } + bool hasP9Altivec() const { return HasP9Altivec; } bool hasMFOCRF() const { return HasMFOCRF; } bool hasISEL() const { return HasISEL; } - bool hasPOPCNTD() const { return HasPOPCNTD; } bool hasBPERMD() const { return HasBPERMD; } bool hasExtDiv() const { return HasExtDiv; } bool hasCMPB() const { return HasCMPB; } @@ -261,6 +274,9 @@ public: bool hasHTM() const { return HasHTM; } bool hasFusion() const { return HasFusion; } bool hasFloat128() const { return HasFloat128; } + bool isISA3_0() const { return IsISA3_0; } + + POPCNTDKind hasPOPCNTD() const { return HasPOPCNTD; } const Triple &getTargetTriple() const { return TargetTriple; } @@ -271,6 +287,7 @@ public: bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); } bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); } + bool isTargetLinux() const { return TargetTriple.isOSLinux(); } bool isDarwinABI() const { return isTargetMachO() || isDarwin(); } bool isSVR4ABI() const { return !isDarwinABI(); } @@ -286,8 +303,6 @@ public: void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override; void overrideSchedPolicy(MachineSchedPolicy &Policy, - MachineInstr *begin, - MachineInstr *end, unsigned NumRegionInstrs) const override; bool useAA() const override; |