13 #ifndef LLVM_LIB_TARGET_MIPS_MIPSSUBTARGET_H 14 #define LLVM_LIB_TARGET_MIPS_MIPSSUBTARGET_H 31 #define GET_SUBTARGETINFO_HEADER 32 #include "MipsGenSubtargetInfo.inc" 37 class MipsTargetMachine;
40 virtual void anchor();
44 Mips1, Mips2, Mips32, Mips32r2, Mips32r3, Mips32r5, Mips32r6, Mips32Max,
45 Mips3, Mips4, Mips5, Mips64, Mips64r2, Mips64r3, Mips64r5, Mips64r6
48 enum class CPU { P5600 };
51 static bool DspWarningPrinted;
54 static bool MSAWarningPrinted;
57 static bool CRCWarningPrinted;
60 static bool GINVWarningPrinted;
63 static bool VirtWarningPrinted;
66 MipsArchEnum MipsArchVersion;
121 bool UseSmallSection;
144 bool InMips16HardFloat;
147 bool InMicroMipsMode;
150 bool HasDSP, HasDSPR2, HasDSPR3;
153 bool AllowMixed16_32;
190 bool UseIndirectJumpsHazard;
193 bool UseLongCalls =
false;
196 bool UseXGOT =
false;
200 Align stackAlignment;
209 enum {NoOverride, Mips16Override, NoMips16Override} OverrideMode;
216 std::unique_ptr<const MipsInstrInfo> InstrInfo;
217 std::unique_ptr<const MipsFrameLowering> FrameLowering;
218 std::unique_ptr<const MipsTargetLowering> TLInfo;
242 bool hasMips1()
const {
return MipsArchVersion >= Mips1; }
243 bool hasMips2()
const {
return MipsArchVersion >= Mips2; }
244 bool hasMips3()
const {
return MipsArchVersion >= Mips3; }
245 bool hasMips4()
const {
return MipsArchVersion >= Mips4; }
246 bool hasMips5()
const {
return MipsArchVersion >= Mips5; }
250 return (MipsArchVersion >= Mips32 && MipsArchVersion < Mips32Max) ||
254 return (MipsArchVersion >= Mips32r2 && MipsArchVersion < Mips32Max) ||
258 return (MipsArchVersion >= Mips32r3 && MipsArchVersion < Mips32Max) ||
262 return (MipsArchVersion >= Mips32r5 && MipsArchVersion < Mips32Max) ||
266 return (MipsArchVersion >= Mips32r6 && MipsArchVersion < Mips32Max) ||
269 bool hasMips64()
const {
return MipsArchVersion >= Mips64; }
318 bool hasMT()
const {
return HasMT; }
346 bool os16()
const {
return Os16; }
380 return FrameLowering.get();
383 return &InstrInfo->getRegisterInfo();
const RegisterBankInfo * getRegBankInfo() const override
bool inMips16HardFloat() const
bool inMips16ModeDefault() const
std::unique_ptr< InstructionSelector > InstSelector
This class represents lattice values for constants.
bool inMips16Mode() const
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
void setHelperClassesMips16()
void getCriticalPathRCs(RegClassVector &CriticalPathRCs) const override
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
const MipsInstrInfo * getInstrInfo() const override
const InstrItineraryData * getInstrItineraryData() const override
bool hasExtractInsert() const
Features related to the presence of specific instructions.
bool enableLongBranchPass() const
Align getStackAlignment() const
Holds all the information related to register banks.
bool inMicroMipsMode() const
bool isXRaySupported() const override
bool hasStandardEncoding() const
bool useIndirectJumpsHazard() const
bool hasMips4_32r2() const
MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS, bool little, const MipsTargetMachine &TM, MaybeAlign StackAlignOverride)
This constructor initializes the data members to match that of the specified triple.
Itinerary data supplied by a subtarget to be used by a target.
bool useSmallSection() const
bool isTargetNaCl() const
const TargetFrameLowering * getFrameLowering() const override
unsigned getGPRSizeInBytes() const
const LegalizerInfo * getLegalizerInfo() const override
bool useLongCalls() const
std::unique_ptr< RegisterBankInfo > RegBankInfo
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
bool isSingleFloat() const
const MipsABIInfo & getABI() const
This struct is a compact representation of a valid (non-zero power of two) alignment.
Triple - Helper class for working with autoconf configuration names.
std::unique_ptr< CallLowering > CallLoweringInfo
static bool useConstantIslands()
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
const MipsRegisterInfo * getRegisterInfo() const override
bool isPositionIndependent() const
This struct is a compact representation of a valid (power of two) or undefined (0) alignment...
bool enablePostRAScheduler() const override
This overrides the PostRAScheduler bit in the SchedModel for each CPU.
void setHelperClassesMipsSE()
Information about stack frame layout on the target.
bool inAbs2008Mode() const
const CallLowering * getCallLowering() const override
const MipsTargetLowering * getTargetLowering() const override
Provides the logic to select generic machine instructions.
bool allowMixed16_32() const
CodeGenOpt::Level getOptLevelToEnablePostRAScheduler() const override
Reloc::Model getRelocationModel() const
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
This file describes how to lower LLVM calls to machine code calls.
InstructionSelector * getInstructionSelector() const override
MipsSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS, const TargetMachine &TM)
bool useSoftFloat() const
Primary interface to the complete machine description for the target machine.
bool inMicroMips32r6Mode() const
StringRef - Represent a constant reference to a string, i.e.
bool systemSupportsUnalignedAccess() const
Does the system support unaligned memory access.
bool disableMadd4() const
std::unique_ptr< LegalizerInfo > Legalizer