LLVM 24.0.0git
llvm::MipsSubtarget Class Reference

#include "Target/Mips/MipsSubtarget.h"

Inheritance diagram for llvm::MipsSubtarget:
[legend]

Public Member Functions

bool isPositionIndependent () const
bool enablePostRAScheduler () const override
 This overrides the PostRAScheduler bit in the SchedModel for each CPU.
void getCriticalPathRCs (RegClassVector &CriticalPathRCs) const override
CodeGenOptLevel getOptLevelToEnablePostRAScheduler () const override
bool isABI_N64 () const
bool isABI_N32 () const
bool isABI_O32 () const
const MipsABIInfo & getABI () const
bool isABI_FPXX () const
bool isGPRReservedByUser (unsigned GPR) const
 MipsSubtarget (const Triple &TT, StringRef CPU, StringRef FS, StringRef ABIName, bool little, const MipsTargetMachine &TM, MaybeAlign StackAlignOverride)
 This constructor initializes the data members to match that of the specified triple.
 ~MipsSubtarget () override
void ParseSubtargetFeatures (StringRef CPU, StringRef TuneCPU, StringRef FS)
 ParseSubtargetFeatures - Parses features string setting specified subtarget options.
bool hasMips1 () const
bool hasMips2 () const
bool hasMips3 () const
bool hasMips4 () const
bool hasMips5 () const
bool hasMips4_32 () const
bool hasMips4_32r2 () const
bool hasMips32 () const
bool hasMips32r2 () const
bool hasMips32r3 () const
bool hasMips32r5 () const
bool hasMips32r6 () const
bool hasMips64 () const
bool hasMips64r2 () const
bool hasMips64r3 () const
bool hasMips64r5 () const
bool hasMips64r6 () const
bool hasCnMips () const
bool hasCnMipsP () const
bool isR5900 () const
bool fixR5900 () const
bool isLittle () const
bool isABICalls () const
bool isFPXX () const
bool isFP64bit () const
bool useOddSPReg () const
bool noOddSPReg () const
bool isNaN2008 () const
bool inAbs2008Mode () const
bool isGP64bit () const
bool isGP32bit () const
unsigned getGPRSizeInBytes () const
bool isPTR64bit () const
bool isPTR32bit () const
bool hasSym32 () const
bool isSingleFloat () const
bool isTargetCOFF () const
bool isTargetELF () const
bool hasVFPU () const
bool inMips16Mode () const
bool inMips16HardFloat () const
bool inMicroMipsMode () const
bool inMicroMips32r6Mode () const
bool hasDSP () const
bool hasDSPR2 () const
bool hasDSPR3 () const
bool has3D () const
bool hasMSA () const
bool disableMadd4 () const
bool hasEVA () const
bool hasMT () const
bool hasCRC () const
bool hasVirt () const
bool hasGINV () const
bool useIndirectJumpsHazard () const
bool useSmallSection () const
bool useCompactBranches () const
bool hasStandardEncoding () const
bool useSoftFloat () const
bool useLongCalls () const
bool useXGOT () const
bool hasExtractInsert () const
 Features related to the presence of specific instructions.
bool hasMTHC1 () const
bool isTargetWindows () const
bool isXRaySupported () const override
bool useConstantIslands () const
Align getStackAlignment () const
Reloc::Model getRelocationModel () const
MipsSubtarget & initializeSubtargetDependencies (StringRef CPU, StringRef FS, const TargetMachine &TM)
bool systemSupportsUnalignedAccess () const
 Does the system support unaligned memory access.
const SelectionDAGTargetInfo * getSelectionDAGInfo () const override
const MipsOptions & getCLOpts () const
const MipsMCOptions & getMCCLOpts () const
const MipsInstrInfo * getInstrInfo () const override
const TargetFrameLowering * getFrameLowering () const override
const MipsRegisterInfo * getRegisterInfo () const override
const MipsTargetLowering * getTargetLowering () const override
void initLibcallLoweringInfo (LibcallLoweringInfo &Info) const override
const CallLowering * getCallLowering () const override
const LegalizerInfo * getLegalizerInfo () const override
const RegisterBankInfo * getRegBankInfo () const override
InstructionSelector * getInstructionSelector () const override

Static Public Attributes

static const RTLIB::LibcallImpl HardFloatLibCalls [34]

Protected Attributes

std::unique_ptr< CallLowering > CallLoweringInfo
std::unique_ptr< LegalizerInfo > Legalizer
std::unique_ptr< RegisterBankInfo > RegBankInfo
std::unique_ptr< InstructionSelector > InstSelector

Detailed Description

Definition at line 53 of file MipsSubtarget.h.

Constructor & Destructor Documentation

◆ MipsSubtarget()

◆ ~MipsSubtarget()

MipsSubtarget::~MipsSubtarget ( )
overridedefault

Member Function Documentation

◆ disableMadd4()

bool llvm::MipsSubtarget::disableMadd4 ( ) const
inline

Definition at line 347 of file MipsSubtarget.h.

◆ enablePostRAScheduler()

bool MipsSubtarget::enablePostRAScheduler ( ) const
override

This overrides the PostRAScheduler bit in the SchedModel for each CPU.

This overrides the PostRAScheduler bit in the SchedModel for any CPU.

Definition at line 206 of file MipsSubtarget.cpp.

◆ fixR5900()

bool llvm::MipsSubtarget::fixR5900 ( ) const
inline

Definition at line 308 of file MipsSubtarget.h.

◆ getABI()

◆ getCallLowering()

const CallLowering * MipsSubtarget::getCallLowering ( ) const
override

Definition at line 267 of file MipsSubtarget.cpp.

References CallLoweringInfo.

◆ getCLOpts()

const MipsOptions & llvm::MipsSubtarget::getCLOpts ( ) const
inline

Definition at line 401 of file MipsSubtarget.h.

Referenced by MipsSubtarget().

◆ getCriticalPathRCs()

void MipsSubtarget::getCriticalPathRCs ( RegClassVector & CriticalPathRCs) const
override

Definition at line 208 of file MipsSubtarget.cpp.

References isGP64bit().

◆ getFrameLowering()

const TargetFrameLowering * llvm::MipsSubtarget::getFrameLowering ( ) const
inlineoverride

◆ getGPRSizeInBytes()

unsigned llvm::MipsSubtarget::getGPRSizeInBytes ( ) const
inline

Definition at line 320 of file MipsSubtarget.h.

References isGP64bit().

◆ getInstrInfo()

const MipsInstrInfo * llvm::MipsSubtarget::getInstrInfo ( ) const
inlineoverride

Definition at line 403 of file MipsSubtarget.h.

◆ getInstructionSelector()

InstructionSelector * MipsSubtarget::getInstructionSelector ( ) const
override

Definition at line 279 of file MipsSubtarget.cpp.

References InstSelector.

◆ getLegalizerInfo()

const LegalizerInfo * MipsSubtarget::getLegalizerInfo ( ) const
override

Definition at line 271 of file MipsSubtarget.cpp.

References Legalizer.

◆ getMCCLOpts()

const MipsMCOptions & llvm::MipsSubtarget::getMCCLOpts ( ) const
inline

Definition at line 402 of file MipsSubtarget.h.

Referenced by MipsSubtarget().

◆ getOptLevelToEnablePostRAScheduler()

CodeGenOptLevel MipsSubtarget::getOptLevelToEnablePostRAScheduler ( ) const
override

Definition at line 214 of file MipsSubtarget.cpp.

References llvm::Aggressive.

◆ getRegBankInfo()

const RegisterBankInfo * MipsSubtarget::getRegBankInfo ( ) const
override

Definition at line 275 of file MipsSubtarget.cpp.

References RegBankInfo.

Referenced by llvm::MipsCallLowering::lowerCall().

◆ getRegisterInfo()

const MipsRegisterInfo * llvm::MipsSubtarget::getRegisterInfo ( ) const
inlineoverride

◆ getRelocationModel()

Reloc::Model MipsSubtarget::getRelocationModel ( ) const

Definition at line 255 of file MipsSubtarget.cpp.

◆ getSelectionDAGInfo()

const SelectionDAGTargetInfo * MipsSubtarget::getSelectionDAGInfo ( ) const
override

Definition at line 263 of file MipsSubtarget.cpp.

◆ getStackAlignment()

Align llvm::MipsSubtarget::getStackAlignment ( ) const
inline

Definition at line 382 of file MipsSubtarget.h.

◆ getTargetLowering()

const MipsTargetLowering * llvm::MipsSubtarget::getTargetLowering ( ) const
inlineoverride

Definition at line 410 of file MipsSubtarget.h.

Referenced by MipsSubtarget().

◆ has3D()

bool llvm::MipsSubtarget::has3D ( ) const
inline

Definition at line 345 of file MipsSubtarget.h.

◆ hasCnMips()

bool llvm::MipsSubtarget::hasCnMips ( ) const
inline

Definition at line 305 of file MipsSubtarget.h.

Referenced by performANDCombine(), and performSHLCombine().

◆ hasCnMipsP()

bool llvm::MipsSubtarget::hasCnMipsP ( ) const
inline

Definition at line 306 of file MipsSubtarget.h.

◆ hasCRC()

bool llvm::MipsSubtarget::hasCRC ( ) const
inline

Definition at line 350 of file MipsSubtarget.h.

Referenced by MipsSubtarget().

◆ hasDSP()

bool llvm::MipsSubtarget::hasDSP ( ) const
inline

Definition at line 342 of file MipsSubtarget.h.

Referenced by MipsSubtarget(), and performDSPShiftCombine().

◆ hasDSPR2()

bool llvm::MipsSubtarget::hasDSPR2 ( ) const
inline

Definition at line 343 of file MipsSubtarget.h.

Referenced by MipsSubtarget(), performSRACombine(), and performSRLCombine().

◆ hasDSPR3()

bool llvm::MipsSubtarget::hasDSPR3 ( ) const
inline

Definition at line 344 of file MipsSubtarget.h.

◆ hasEVA()

bool llvm::MipsSubtarget::hasEVA ( ) const
inline

Definition at line 348 of file MipsSubtarget.h.

◆ hasExtractInsert()

bool llvm::MipsSubtarget::hasExtractInsert ( ) const
inline

Features related to the presence of specific instructions.

Definition at line 371 of file MipsSubtarget.h.

References hasMips32r2(), and inMips16Mode().

Referenced by performANDCombine(), and performORCombine().

◆ hasGINV()

bool llvm::MipsSubtarget::hasGINV ( ) const
inline

Definition at line 352 of file MipsSubtarget.h.

Referenced by MipsSubtarget().

◆ hasMips1()

bool llvm::MipsSubtarget::hasMips1 ( ) const
inline

Definition at line 272 of file MipsSubtarget.h.

◆ hasMips2()

bool llvm::MipsSubtarget::hasMips2 ( ) const
inline

Definition at line 273 of file MipsSubtarget.h.

◆ hasMips3()

bool llvm::MipsSubtarget::hasMips3 ( ) const
inline

Definition at line 274 of file MipsSubtarget.h.

◆ hasMips32()

bool llvm::MipsSubtarget::hasMips32 ( ) const
inline

Definition at line 279 of file MipsSubtarget.h.

References hasMips64().

Referenced by MipsSubtarget(), performADDCombine(), and performSUBCombine().

◆ hasMips32r2()

bool llvm::MipsSubtarget::hasMips32r2 ( ) const
inline

Definition at line 283 of file MipsSubtarget.h.

References hasMips64r2().

Referenced by hasExtractInsert(), hasMTHC1(), MipsSubtarget(), and useIndirectJumpsHazard().

◆ hasMips32r3()

bool llvm::MipsSubtarget::hasMips32r3 ( ) const
inline

Definition at line 287 of file MipsSubtarget.h.

References hasMips64r2().

◆ hasMips32r5()

bool llvm::MipsSubtarget::hasMips32r5 ( ) const
inline

Definition at line 291 of file MipsSubtarget.h.

References hasMips64r5().

Referenced by MipsSubtarget().

◆ hasMips32r6()

◆ hasMips4()

bool llvm::MipsSubtarget::hasMips4 ( ) const
inline

Definition at line 275 of file MipsSubtarget.h.

◆ hasMips4_32()

bool llvm::MipsSubtarget::hasMips4_32 ( ) const
inline

Definition at line 277 of file MipsSubtarget.h.

◆ hasMips4_32r2()

bool llvm::MipsSubtarget::hasMips4_32r2 ( ) const
inline

Definition at line 278 of file MipsSubtarget.h.

◆ hasMips5()

bool llvm::MipsSubtarget::hasMips5 ( ) const
inline

Definition at line 276 of file MipsSubtarget.h.

◆ hasMips64()

bool llvm::MipsSubtarget::hasMips64 ( ) const
inline

◆ hasMips64r2()

bool llvm::MipsSubtarget::hasMips64r2 ( ) const
inline

Definition at line 300 of file MipsSubtarget.h.

Referenced by hasMips32r2(), hasMips32r3(), MipsSubtarget(), and performORCombine().

◆ hasMips64r3()

bool llvm::MipsSubtarget::hasMips64r3 ( ) const
inline

Definition at line 301 of file MipsSubtarget.h.

◆ hasMips64r5()

bool llvm::MipsSubtarget::hasMips64r5 ( ) const
inline

Definition at line 302 of file MipsSubtarget.h.

Referenced by hasMips32r5().

◆ hasMips64r6()

bool llvm::MipsSubtarget::hasMips64r6 ( ) const
inline

◆ hasMSA()

bool llvm::MipsSubtarget::hasMSA ( ) const
inline

◆ hasMT()

bool llvm::MipsSubtarget::hasMT ( ) const
inline

Definition at line 349 of file MipsSubtarget.h.

◆ hasMTHC1()

bool llvm::MipsSubtarget::hasMTHC1 ( ) const
inline

Definition at line 372 of file MipsSubtarget.h.

References hasMips32r2().

◆ hasStandardEncoding()

bool llvm::MipsSubtarget::hasStandardEncoding ( ) const
inline

Definition at line 362 of file MipsSubtarget.h.

◆ hasSym32()

bool llvm::MipsSubtarget::hasSym32 ( ) const
inline

Definition at line 323 of file MipsSubtarget.h.

References isABI_N32(), isABI_N64(), and isABI_O32().

Referenced by llvm::MipsAsmPrinter::emitStartOfAsmFile(), and MipsSubtarget().

◆ hasVFPU()

bool llvm::MipsSubtarget::hasVFPU ( ) const
inline

Definition at line 329 of file MipsSubtarget.h.

◆ hasVirt()

bool llvm::MipsSubtarget::hasVirt ( ) const
inline

Definition at line 351 of file MipsSubtarget.h.

Referenced by MipsSubtarget().

◆ inAbs2008Mode()

bool llvm::MipsSubtarget::inAbs2008Mode ( ) const
inline

Definition at line 317 of file MipsSubtarget.h.

Referenced by MipsSubtarget().

◆ initializeSubtargetDependencies()

MipsSubtarget & MipsSubtarget::initializeSubtargetDependencies ( StringRef CPU,
StringRef FS,
const TargetMachine & TM )

◆ initLibcallLoweringInfo()

void MipsSubtarget::initLibcallLoweringInfo ( LibcallLoweringInfo & Info) const
override

◆ inMicroMips32r6Mode()

bool llvm::MipsSubtarget::inMicroMips32r6Mode ( ) const
inline

Definition at line 339 of file MipsSubtarget.h.

References hasMips32r6(), and inMicroMipsMode().

◆ inMicroMipsMode()

bool llvm::MipsSubtarget::inMicroMipsMode ( ) const
inline

◆ inMips16HardFloat()

bool llvm::MipsSubtarget::inMips16HardFloat ( ) const
inline

Definition at line 335 of file MipsSubtarget.h.

References inMips16Mode().

Referenced by llvm::MipsCCState::getSpecialCallingConvForCallee().

◆ inMips16Mode()

◆ isABI_FPXX()

bool llvm::MipsSubtarget::isABI_FPXX ( ) const
inline

Definition at line 251 of file MipsSubtarget.h.

References isABI_O32().

Referenced by llvm::MipsAsmPrinter::emitStartOfAsmFile().

◆ isABI_N32()

◆ isABI_N64()

◆ isABI_O32()

bool MipsSubtarget::isABI_O32 ( ) const

◆ isABICalls()

bool llvm::MipsSubtarget::isABICalls ( ) const
inline

◆ isFP64bit()

◆ isFPXX()

bool llvm::MipsSubtarget::isFPXX ( ) const
inline

◆ isGP32bit()

bool llvm::MipsSubtarget::isGP32bit ( ) const
inline

Definition at line 319 of file MipsSubtarget.h.

Referenced by llvm::MipsRegisterInfo::canRealignStack().

◆ isGP64bit()

◆ isGPRReservedByUser()

bool llvm::MipsSubtarget::isGPRReservedByUser ( unsigned GPR) const
inline

Definition at line 253 of file MipsSubtarget.h.

References assert().

Referenced by llvm::MipsRegisterInfo::getReservedRegs().

◆ isLittle()

bool llvm::MipsSubtarget::isLittle ( ) const
inline

Definition at line 310 of file MipsSubtarget.h.

Referenced by CC_MipsO32(), performDSPShiftCombine(), and performORCombine().

◆ isNaN2008()

bool llvm::MipsSubtarget::isNaN2008 ( ) const
inline

Definition at line 316 of file MipsSubtarget.h.

Referenced by llvm::MipsAsmPrinter::emitStartOfAsmFile(), and MipsSubtarget().

◆ isPositionIndependent()

bool MipsSubtarget::isPositionIndependent ( ) const

Definition at line 201 of file MipsSubtarget.cpp.

Referenced by getUnconditionalBranch().

◆ isPTR32bit()

bool llvm::MipsSubtarget::isPTR32bit ( ) const
inline

Definition at line 322 of file MipsSubtarget.h.

◆ isPTR64bit()

bool llvm::MipsSubtarget::isPTR64bit ( ) const
inline

Definition at line 321 of file MipsSubtarget.h.

◆ isR5900()

bool llvm::MipsSubtarget::isR5900 ( ) const
inline

Definition at line 307 of file MipsSubtarget.h.

◆ isSingleFloat()

bool llvm::MipsSubtarget::isSingleFloat ( ) const
inline

◆ isTargetCOFF()

bool llvm::MipsSubtarget::isTargetCOFF ( ) const
inline

Definition at line 327 of file MipsSubtarget.h.

◆ isTargetELF()

bool llvm::MipsSubtarget::isTargetELF ( ) const
inline

Definition at line 328 of file MipsSubtarget.h.

◆ isTargetWindows()

bool llvm::MipsSubtarget::isTargetWindows ( ) const
inline

Definition at line 374 of file MipsSubtarget.h.

◆ isXRaySupported()

bool llvm::MipsSubtarget::isXRaySupported ( ) const
inlineoverride

Definition at line 376 of file MipsSubtarget.h.

◆ noOddSPReg()

bool llvm::MipsSubtarget::noOddSPReg ( ) const
inline

Definition at line 315 of file MipsSubtarget.h.

◆ ParseSubtargetFeatures()

void llvm::MipsSubtarget::ParseSubtargetFeatures ( StringRef CPU,
StringRef TuneCPU,
StringRef FS )

ParseSubtargetFeatures - Parses features string setting specified subtarget options.

Definition of function is auto generated by tblgen.

Referenced by initializeSubtargetDependencies().

◆ systemSupportsUnalignedAccess()

bool llvm::MipsSubtarget::systemSupportsUnalignedAccess ( ) const
inline

Does the system support unaligned memory access.

MIPS32r6/MIPS64r6 require full unaligned access support but does not specify which component of the system provides it. Hardware, software, and hybrid implementations are all valid.

Definition at line 395 of file MipsSubtarget.h.

References hasMips32r6().

Referenced by isGprbTwoInstrUnalignedLoadOrStore().

◆ useCompactBranches()

bool llvm::MipsSubtarget::useCompactBranches ( ) const
inline

Definition at line 358 of file MipsSubtarget.h.

References hasMips32r6().

◆ useConstantIslands()

bool MipsSubtarget::useConstantIslands ( ) const

Definition at line 249 of file MipsSubtarget.cpp.

References llvm::dbgs(), and LLVM_DEBUG.

◆ useIndirectJumpsHazard()

bool llvm::MipsSubtarget::useIndirectJumpsHazard ( ) const
inline

Definition at line 353 of file MipsSubtarget.h.

References hasMips32r2().

◆ useLongCalls()

bool llvm::MipsSubtarget::useLongCalls ( ) const
inline

Definition at line 366 of file MipsSubtarget.h.

◆ useOddSPReg()

bool llvm::MipsSubtarget::useOddSPReg ( ) const
inline

Definition at line 314 of file MipsSubtarget.h.

Referenced by llvm::MipsAsmPrinter::emitStartOfAsmFile(), and MipsSubtarget().

◆ useSmallSection()

bool llvm::MipsSubtarget::useSmallSection ( ) const
inline

◆ useSoftFloat()

bool llvm::MipsSubtarget::useSoftFloat ( ) const
inline

◆ useXGOT()

bool llvm::MipsSubtarget::useXGOT ( ) const
inline

Definition at line 368 of file MipsSubtarget.h.

Member Data Documentation

◆ CallLoweringInfo

std::unique_ptr<CallLowering> llvm::MipsSubtarget::CallLoweringInfo
protected

Definition at line 417 of file MipsSubtarget.h.

Referenced by getCallLowering(), and MipsSubtarget().

◆ HardFloatLibCalls

const RTLIB::LibcallImpl MipsSubtarget::HardFloatLibCalls
static
Initial value:
= {
RTLIB::impl___mips16_adddf3, RTLIB::impl___mips16_addsf3,
RTLIB::impl___mips16_divdf3, RTLIB::impl___mips16_divsf3,
RTLIB::impl___mips16_eqdf2, RTLIB::impl___mips16_eqsf2,
RTLIB::impl___mips16_extendsfdf2, RTLIB::impl___mips16_fix_truncdfsi,
RTLIB::impl___mips16_fix_truncsfsi, RTLIB::impl___mips16_floatsidf,
RTLIB::impl___mips16_floatsisf, RTLIB::impl___mips16_floatunsidf,
RTLIB::impl___mips16_floatunsisf, RTLIB::impl___mips16_gedf2,
RTLIB::impl___mips16_gesf2, RTLIB::impl___mips16_gtdf2,
RTLIB::impl___mips16_gtsf2, RTLIB::impl___mips16_ledf2,
RTLIB::impl___mips16_lesf2, RTLIB::impl___mips16_ltdf2,
RTLIB::impl___mips16_ltsf2, RTLIB::impl___mips16_muldf3,
RTLIB::impl___mips16_mulsf3, RTLIB::impl___mips16_nedf2,
RTLIB::impl___mips16_nesf2, RTLIB::impl___mips16_ret_dc,
RTLIB::impl___mips16_ret_df, RTLIB::impl___mips16_ret_sc,
RTLIB::impl___mips16_ret_sf, RTLIB::impl___mips16_subdf3,
RTLIB::impl___mips16_subsf3, RTLIB::impl___mips16_truncdfsf2,
RTLIB::impl___mips16_unorddf2, RTLIB::impl___mips16_unordsf2}

Definition at line 270 of file MipsSubtarget.h.

Referenced by initLibcallLoweringInfo(), and isMips16HardFloatLibcall().

◆ InstSelector

std::unique_ptr<InstructionSelector> llvm::MipsSubtarget::InstSelector
protected

Definition at line 420 of file MipsSubtarget.h.

Referenced by getInstructionSelector(), and MipsSubtarget().

◆ Legalizer

std::unique_ptr<LegalizerInfo> llvm::MipsSubtarget::Legalizer
protected

Definition at line 418 of file MipsSubtarget.h.

Referenced by getLegalizerInfo(), and MipsSubtarget().

◆ RegBankInfo

std::unique_ptr<RegisterBankInfo> llvm::MipsSubtarget::RegBankInfo
protected

Definition at line 419 of file MipsSubtarget.h.

Referenced by getRegBankInfo(), and MipsSubtarget().


The documentation for this class was generated from the following files: