LLVM  14.0.0git
Public Member Functions | Protected Types | Protected Attributes | List of all members
llvm::M68kSubtarget Class Reference

#include "Target/M68k/M68kSubtarget.h"

Inheritance diagram for llvm::M68kSubtarget:
Inheritance graph
[legend]
Collaboration diagram for llvm::M68kSubtarget:
Collaboration graph
[legend]

Public Member Functions

 M68kSubtarget (const Triple &TT, StringRef CPU, StringRef FS, const M68kTargetMachine &_TM)
 This constructor initializes the data members to match that of the specified triple. More...
 
void ParseSubtargetFeatures (StringRef CPU, StringRef TuneCPU, StringRef FS)
 Parses features string setting specified subtarget options. More...
 
bool atLeastM68000 () const
 
bool atLeastM68010 () const
 
bool atLeastM68020 () const
 
bool atLeastM68030 () const
 
bool atLeastM68040 () const
 
bool atLeastM68060 () const
 
bool useSmallSection () const
 
bool abiUsesSoftFloat () const
 
const TriplegetTargetTriple () const
 
bool isTargetELF () const
 
bool isLegalToCallImmediateAddr () const
 Return true if the subtarget allows calls to immediate address. More...
 
bool isPositionIndependent () const
 
bool isRegisterReservedByUser (Register R) const
 
unsigned char classifyLocalReference (const GlobalValue *GV) const
 Classify a global variable reference for the current subtarget according to how we should reference it in a non-pcrel context. More...
 
unsigned char classifyGlobalReference (const GlobalValue *GV, const Module &M) const
 Classify a global variable reference for the current subtarget according to how we should reference it in a non-pcrel context. More...
 
unsigned char classifyGlobalReference (const GlobalValue *GV) const
 
unsigned char classifyExternalReference (const Module &M) const
 Classify a external variable reference for the current subtarget according to how we should reference it in a non-pcrel context. More...
 
unsigned char classifyGlobalFunctionReference (const GlobalValue *GV, const Module &M) const
 Classify a global function reference for the current subtarget. More...
 
unsigned char classifyGlobalFunctionReference (const GlobalValue *GV) const
 
unsigned char classifyBlockAddressReference () const
 Classify a blockaddress reference for the current subtarget according to how we should reference it in a non-pcrel context. More...
 
unsigned getJumpTableEncoding () const
 
Align getStackAlignment () const
 TODO this must be controlled by options like -malign-int and -mshort. More...
 
unsigned getSlotSize () const
 getSlotSize - Stack slot size in bytes. More...
 
M68kSubtargetinitializeSubtargetDependencies (StringRef CPU, Triple TT, StringRef FS, const M68kTargetMachine &TM)
 
const SelectionDAGTargetInfogetSelectionDAGInfo () const override
 
const M68kInstrInfogetInstrInfo () const override
 
const M68kFrameLoweringgetFrameLowering () const override
 
const M68kRegisterInfogetRegisterInfo () const override
 
const M68kTargetLoweringgetTargetLowering () const override
 
const InstrItineraryDatagetInstrItineraryData () const override
 
const CallLoweringgetCallLowering () const override
 
InstructionSelectorgetInstructionSelector () const override
 
const LegalizerInfogetLegalizerInfo () const override
 
const RegisterBankInfogetRegBankInfo () const override
 

Protected Types

enum  SubtargetEnum {
  M00, M10, M20, M30,
  M40, M60
}
 

Protected Attributes

SubtargetEnum SubtargetKind = M00
 
BitVector UserReservedRegister
 
InstrItineraryData InstrItins
 
bool UseSmallSection = true
 Small section is used. More...
 
const M68kTargetMachineTM
 
SelectionDAGTargetInfo TSInfo
 
M68kInstrInfo InstrInfo
 
M68kFrameLowering FrameLowering
 
M68kTargetLowering TLInfo
 
unsigned stackAlignment = 8
 The minimum alignment known to hold of the stack frame on entry to the function and which must be maintained by every function. More...
 
Triple TargetTriple
 
std::unique_ptr< CallLoweringCallLoweringInfo
 
std::unique_ptr< InstructionSelectorInstSelector
 
std::unique_ptr< LegalizerInfoLegalizer
 
std::unique_ptr< RegisterBankInfoRegBankInfo
 

Detailed Description

Definition at line 45 of file M68kSubtarget.h.

Member Enumeration Documentation

◆ SubtargetEnum

Enumerator
M00 
M10 
M20 
M30 
M40 
M60 

Definition at line 52 of file M68kSubtarget.h.

Constructor & Destructor Documentation

◆ M68kSubtarget()

M68kSubtarget::M68kSubtarget ( const Triple TT,
StringRef  CPU,
StringRef  FS,
const M68kTargetMachine _TM 
)

This constructor initializes the data members to match that of the specified triple.

Definition at line 51 of file M68kSubtarget.cpp.

References CallLoweringInfo, llvm::createM68kInstructionSelector(), getRegisterInfo(), getTargetLowering(), InstSelector, RegBankInfo, and TM.

Member Function Documentation

◆ abiUsesSoftFloat()

bool M68kSubtarget::abiUsesSoftFloat ( ) const

Definition at line 88 of file M68kSubtarget.cpp.

◆ atLeastM68000()

bool llvm::M68kSubtarget::atLeastM68000 ( ) const
inline

Definition at line 85 of file M68kSubtarget.h.

References M00, and SubtargetKind.

◆ atLeastM68010()

bool llvm::M68kSubtarget::atLeastM68010 ( ) const
inline

Definition at line 86 of file M68kSubtarget.h.

References M10, and SubtargetKind.

◆ atLeastM68020()

bool llvm::M68kSubtarget::atLeastM68020 ( ) const
inline

◆ atLeastM68030()

bool llvm::M68kSubtarget::atLeastM68030 ( ) const
inline

Definition at line 88 of file M68kSubtarget.h.

References M30, and SubtargetKind.

◆ atLeastM68040()

bool llvm::M68kSubtarget::atLeastM68040 ( ) const
inline

Definition at line 89 of file M68kSubtarget.h.

References M40, and SubtargetKind.

◆ atLeastM68060()

bool llvm::M68kSubtarget::atLeastM68060 ( ) const
inline

Definition at line 90 of file M68kSubtarget.h.

References M60, and SubtargetKind.

◆ classifyBlockAddressReference()

unsigned char M68kSubtarget::classifyBlockAddressReference ( ) const

Classify a blockaddress reference for the current subtarget according to how we should reference it in a non-pcrel context.

Definition at line 147 of file M68kSubtarget.cpp.

References llvm::M68kII::MO_PC_RELATIVE_ADDRESS.

◆ classifyExternalReference()

unsigned char M68kSubtarget::classifyExternalReference ( const Module M) const

Classify a external variable reference for the current subtarget according to how we should reference it in a non-pcrel context.

Definition at line 180 of file M68kSubtarget.cpp.

References classifyLocalReference(), isPositionIndependent(), M, llvm::M68kII::MO_GOT, llvm::M68kII::MO_GOTPCREL, llvm::TargetMachine::shouldAssumeDSOLocal(), and TM.

◆ classifyGlobalFunctionReference() [1/2]

unsigned char M68kSubtarget::classifyGlobalFunctionReference ( const GlobalValue GV) const

◆ classifyGlobalFunctionReference() [2/2]

unsigned char M68kSubtarget::classifyGlobalFunctionReference ( const GlobalValue GV,
const Module M 
) const

Classify a global function reference for the current subtarget.

Definition at line 243 of file M68kSubtarget.cpp.

References F, M, llvm::M68kII::MO_GOTPCREL, llvm::M68kII::MO_NO_FLAG, llvm::M68kII::MO_PLT, llvm::TargetMachine::shouldAssumeDSOLocal(), and TM.

Referenced by classifyGlobalFunctionReference().

◆ classifyGlobalReference() [1/2]

unsigned char M68kSubtarget::classifyGlobalReference ( const GlobalValue GV) const

Definition at line 191 of file M68kSubtarget.cpp.

References classifyGlobalReference(), and llvm::GlobalValue::getParent().

◆ classifyGlobalReference() [2/2]

unsigned char M68kSubtarget::classifyGlobalReference ( const GlobalValue GV,
const Module M 
) const

◆ classifyLocalReference()

unsigned char M68kSubtarget::classifyLocalReference ( const GlobalValue GV) const

Classify a global variable reference for the current subtarget according to how we should reference it in a non-pcrel context.

Definition at line 153 of file M68kSubtarget.cpp.

References atLeastM68020(), llvm::TargetMachine::getCodeModel(), isPositionIndependent(), llvm::CodeModel::Kernel, llvm_unreachable, llvm::CodeModel::Medium, llvm::M68kII::MO_ABSOLUTE_ADDRESS, llvm::M68kII::MO_GOTOFF, llvm::M68kII::MO_PC_RELATIVE_ADDRESS, llvm::CodeModel::Small, and TM.

Referenced by classifyExternalReference(), and classifyGlobalReference().

◆ getCallLowering()

const CallLowering * M68kSubtarget::getCallLowering ( ) const
override

Definition at line 66 of file M68kSubtarget.cpp.

References CallLoweringInfo.

◆ getFrameLowering()

const M68kFrameLowering* llvm::M68kSubtarget::getFrameLowering ( ) const
inlineoverride

Definition at line 151 of file M68kSubtarget.h.

References FrameLowering.

◆ getInstrInfo()

const M68kInstrInfo* llvm::M68kSubtarget::getInstrInfo ( ) const
inlineoverride

Definition at line 149 of file M68kSubtarget.h.

References InstrInfo.

◆ getInstrItineraryData()

const InstrItineraryData* llvm::M68kSubtarget::getInstrItineraryData ( ) const
inlineoverride

Definition at line 163 of file M68kSubtarget.h.

References InstrItins.

◆ getInstructionSelector()

InstructionSelector * M68kSubtarget::getInstructionSelector ( ) const
override

Definition at line 70 of file M68kSubtarget.cpp.

References InstSelector.

◆ getJumpTableEncoding()

unsigned M68kSubtarget::getJumpTableEncoding ( ) const

◆ getLegalizerInfo()

const LegalizerInfo * M68kSubtarget::getLegalizerInfo ( ) const
override

Definition at line 74 of file M68kSubtarget.cpp.

◆ getRegBankInfo()

const RegisterBankInfo * M68kSubtarget::getRegBankInfo ( ) const
override

Definition at line 78 of file M68kSubtarget.cpp.

References RegBankInfo.

◆ getRegisterInfo()

const M68kRegisterInfo* llvm::M68kSubtarget::getRegisterInfo ( ) const
inlineoverride

◆ getSelectionDAGInfo()

const SelectionDAGTargetInfo* llvm::M68kSubtarget::getSelectionDAGInfo ( ) const
inlineoverride

Definition at line 145 of file M68kSubtarget.h.

References TSInfo.

◆ getSlotSize()

unsigned llvm::M68kSubtarget::getSlotSize ( ) const
inline

getSlotSize - Stack slot size in bytes.

Definition at line 139 of file M68kSubtarget.h.

Referenced by llvm::M68kFrameLowering::M68kFrameLowering().

◆ getStackAlignment()

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

TODO this must be controlled by options like -malign-int and -mshort.

Definition at line 136 of file M68kSubtarget.h.

References Align, and stackAlignment.

◆ getTargetLowering()

const M68kTargetLowering* llvm::M68kSubtarget::getTargetLowering ( ) const
inlineoverride

Definition at line 159 of file M68kSubtarget.h.

References TLInfo.

Referenced by M68kSubtarget().

◆ getTargetTriple()

const Triple& llvm::M68kSubtarget::getTargetTriple ( ) const
inline

Definition at line 96 of file M68kSubtarget.h.

References TargetTriple.

◆ initializeSubtargetDependencies()

M68kSubtarget & M68kSubtarget::initializeSubtargetDependencies ( StringRef  CPU,
Triple  TT,
StringRef  FS,
const M68kTargetMachine TM 
)

◆ isLegalToCallImmediateAddr()

bool M68kSubtarget::isLegalToCallImmediateAddr ( ) const

Return true if the subtarget allows calls to immediate address.

Definition at line 86 of file M68kSubtarget.cpp.

◆ isPositionIndependent()

bool M68kSubtarget::isPositionIndependent ( ) const

◆ isRegisterReservedByUser()

bool llvm::M68kSubtarget::isRegisterReservedByUser ( Register  R) const
inline

Definition at line 105 of file M68kSubtarget.h.

References assert(), and UserReservedRegister.

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

◆ isTargetELF()

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

Definition at line 98 of file M68kSubtarget.h.

References llvm::Triple::isOSBinFormatELF(), and TargetTriple.

◆ ParseSubtargetFeatures()

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

Parses features string setting specified subtarget options.

Definition of function is auto generated by tblgen.

Referenced by initializeSubtargetDependencies().

◆ useSmallSection()

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

Definition at line 92 of file M68kSubtarget.h.

References UseSmallSection.

Member Data Documentation

◆ CallLoweringInfo

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

Definition at line 169 of file M68kSubtarget.h.

Referenced by getCallLowering(), and M68kSubtarget().

◆ FrameLowering

M68kFrameLowering llvm::M68kSubtarget::FrameLowering
protected

Definition at line 66 of file M68kSubtarget.h.

Referenced by getFrameLowering().

◆ InstrInfo

M68kInstrInfo llvm::M68kSubtarget::InstrInfo
protected

Definition at line 65 of file M68kSubtarget.h.

Referenced by getInstrInfo(), and getRegisterInfo().

◆ InstrItins

InstrItineraryData llvm::M68kSubtarget::InstrItins
protected

Definition at line 57 of file M68kSubtarget.h.

Referenced by getInstrItineraryData(), and initializeSubtargetDependencies().

◆ InstSelector

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

Definition at line 170 of file M68kSubtarget.h.

Referenced by getInstructionSelector(), and M68kSubtarget().

◆ Legalizer

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

Definition at line 171 of file M68kSubtarget.h.

◆ RegBankInfo

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

Definition at line 172 of file M68kSubtarget.h.

Referenced by getRegBankInfo(), and M68kSubtarget().

◆ stackAlignment

unsigned llvm::M68kSubtarget::stackAlignment = 8
protected

The minimum alignment known to hold of the stack frame on entry to the function and which must be maintained by every function.

Definition at line 71 of file M68kSubtarget.h.

Referenced by getStackAlignment(), and initializeSubtargetDependencies().

◆ SubtargetKind

SubtargetEnum llvm::M68kSubtarget::SubtargetKind = M00
protected

◆ TargetTriple

Triple llvm::M68kSubtarget::TargetTriple
protected

Definition at line 73 of file M68kSubtarget.h.

Referenced by getTargetTriple(), and isTargetELF().

◆ TLInfo

M68kTargetLowering llvm::M68kSubtarget::TLInfo
protected

Definition at line 67 of file M68kSubtarget.h.

Referenced by getTargetLowering().

◆ TM

const M68kTargetMachine& llvm::M68kSubtarget::TM
protected

◆ TSInfo

SelectionDAGTargetInfo llvm::M68kSubtarget::TSInfo
protected

Definition at line 64 of file M68kSubtarget.h.

Referenced by getSelectionDAGInfo().

◆ UserReservedRegister

BitVector llvm::M68kSubtarget::UserReservedRegister
protected

Definition at line 55 of file M68kSubtarget.h.

Referenced by isRegisterReservedByUser().

◆ UseSmallSection

bool llvm::M68kSubtarget::UseSmallSection = true
protected

Small section is used.

Definition at line 60 of file M68kSubtarget.h.

Referenced by useSmallSection().


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