diff options
Diffstat (limited to 'contrib/llvm/lib/Target/Mips/MipsSubtarget.h')
-rw-r--r-- | contrib/llvm/lib/Target/Mips/MipsSubtarget.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/Mips/MipsSubtarget.h b/contrib/llvm/lib/Target/Mips/MipsSubtarget.h index ad2905c51601..676d702ba63e 100644 --- a/contrib/llvm/lib/Target/Mips/MipsSubtarget.h +++ b/contrib/llvm/lib/Target/Mips/MipsSubtarget.h @@ -20,6 +20,10 @@ #include "MipsInstrInfo.h" #include "llvm/CodeGen/SelectionDAGTargetInfo.h" #include "llvm/CodeGen/TargetSubtargetInfo.h" +#include "llvm/CodeGen/GlobalISel/CallLowering.h" +#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h" +#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h" +#include "llvm/CodeGen/GlobalISel/InstructionSelector.h" #include "llvm/IR/DataLayout.h" #include "llvm/MC/MCInstrItineraries.h" #include "llvm/Support/ErrorHandling.h" @@ -44,6 +48,21 @@ class MipsSubtarget : public MipsGenSubtargetInfo { enum class CPU { P5600 }; + // Used to avoid printing dsp warnings multiple times. + static bool DspWarningPrinted; + + // Used to avoid printing msa warnings multiple times. + static bool MSAWarningPrinted; + + // Used to avoid printing crc warnings multiple times. + static bool CRCWarningPrinted; + + // Used to avoid printing ginv warnings multiple times. + static bool GINVWarningPrinted; + + // Used to avoid printing virt warnings multiple times. + static bool VirtWarningPrinted; + // Mips architecture version MipsArchEnum MipsArchVersion; @@ -152,6 +171,15 @@ class MipsSubtarget : public MipsGenSubtargetInfo { // HasMT -- support MT ASE. bool HasMT; + // HasCRC -- supports R6 CRC ASE + bool HasCRC; + + // HasVirt -- supports Virtualization ASE + bool HasVirt; + + // HasGINV -- supports R6 Global INValidate ASE + bool HasGINV; + // Use hazard variants of the jump register instructions for indirect // function calls and jump tables. bool UseIndirectJumpsHazard; @@ -276,6 +304,9 @@ public: bool disableMadd4() const { return DisableMadd4; } bool hasEVA() const { return HasEVA; } bool hasMT() const { return HasMT; } + bool hasCRC() const { return HasCRC; } + bool hasVirt() const { return HasVirt; } + bool hasGINV() const { return HasGINV; } bool useIndirectJumpsHazard() const { return UseIndirectJumpsHazard && hasMips32r2(); } @@ -343,6 +374,19 @@ public: const InstrItineraryData *getInstrItineraryData() const override { return &InstrItins; } + +protected: + // GlobalISel related APIs. + std::unique_ptr<CallLowering> CallLoweringInfo; + std::unique_ptr<LegalizerInfo> Legalizer; + std::unique_ptr<RegisterBankInfo> RegBankInfo; + std::unique_ptr<InstructionSelector> InstSelector; + +public: + const CallLowering *getCallLowering() const override; + const LegalizerInfo *getLegalizerInfo() const override; + const RegisterBankInfo *getRegBankInfo() const override; + const InstructionSelector *getInstructionSelector() const override; }; } // End llvm namespace |