LLVM
17.0.0git
|
#include "Target/M68k/M68kSubtarget.h"
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 Triple & | getTargetTriple () 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 override |
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... | |
M68kSubtarget & | initializeSubtargetDependencies (StringRef CPU, Triple TT, StringRef FS, const M68kTargetMachine &TM) |
const SelectionDAGTargetInfo * | getSelectionDAGInfo () const override |
const M68kInstrInfo * | getInstrInfo () const override |
const M68kFrameLowering * | getFrameLowering () const override |
const M68kRegisterInfo * | getRegisterInfo () const override |
const M68kTargetLowering * | getTargetLowering () const override |
const InstrItineraryData * | getInstrItineraryData () const override |
const CallLowering * | getCallLowering () const override |
InstructionSelector * | getInstructionSelector () const override |
const LegalizerInfo * | getLegalizerInfo () const override |
const RegisterBankInfo * | getRegBankInfo () const override |
Protected Types | |
enum | SubtargetEnum { M00, M10, M20, M30, M40, M60 } |
Protected Attributes | |
SubtargetEnum | SubtargetKind = M00 |
std::bitset< M68k::NUM_TARGET_REGS > | UserReservedRegister |
InstrItineraryData | InstrItins |
bool | UseSmallSection = true |
Small section is used. More... | |
const M68kTargetMachine & | TM |
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< CallLowering > | CallLoweringInfo |
std::unique_ptr< InstructionSelector > | InstSelector |
std::unique_ptr< LegalizerInfo > | Legalizer |
std::unique_ptr< RegisterBankInfo > | RegBankInfo |
Definition at line 44 of file M68kSubtarget.h.
|
protected |
Enumerator | |
---|---|
M00 | |
M10 | |
M20 | |
M30 | |
M40 | |
M60 |
Definition at line 51 of file M68kSubtarget.h.
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.
bool M68kSubtarget::abiUsesSoftFloat | ( | ) | const |
Definition at line 87 of file M68kSubtarget.cpp.
|
inline |
Definition at line 84 of file M68kSubtarget.h.
References M00, and SubtargetKind.
|
inline |
Definition at line 85 of file M68kSubtarget.h.
References M10, and SubtargetKind.
|
inline |
Definition at line 86 of file M68kSubtarget.h.
References M20, and SubtargetKind.
Referenced by classifyGlobalReference(), classifyLocalReference(), getJumpTableEncoding(), llvm::M68kTargetLowering::M68kTargetLowering(), and llvm::M68kTargetLowering::shouldExpandAtomicRMWInIR().
|
inline |
Definition at line 87 of file M68kSubtarget.h.
References M30, and SubtargetKind.
|
inline |
Definition at line 88 of file M68kSubtarget.h.
References M40, and SubtargetKind.
|
inline |
Definition at line 89 of file M68kSubtarget.h.
References M60, and SubtargetKind.
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 146 of file M68kSubtarget.cpp.
References llvm::M68kII::MO_PC_RELATIVE_ADDRESS.
Classify a external variable reference for the current subtarget according to how we should reference it in a non-pcrel context.
Definition at line 179 of file M68kSubtarget.cpp.
References classifyLocalReference(), isPositionIndependent(), M, llvm::M68kII::MO_GOT, llvm::M68kII::MO_GOTPCREL, llvm::TargetMachine::shouldAssumeDSOLocal(), and TM.
|
override |
Definition at line 237 of file M68kSubtarget.cpp.
References classifyGlobalFunctionReference(), and llvm::GlobalValue::getParent().
unsigned char M68kSubtarget::classifyGlobalFunctionReference | ( | const GlobalValue * | GV, |
const Module & | M | ||
) | const |
Classify a global function reference for the current subtarget.
Definition at line 242 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().
unsigned char M68kSubtarget::classifyGlobalReference | ( | const GlobalValue * | GV | ) | const |
Definition at line 190 of file M68kSubtarget.cpp.
References classifyGlobalReference(), and llvm::GlobalValue::getParent().
unsigned char M68kSubtarget::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.
Definition at line 194 of file M68kSubtarget.cpp.
References atLeastM68020(), classifyLocalReference(), llvm::TargetMachine::getCodeModel(), isPositionIndependent(), llvm::CodeModel::Kernel, llvm_unreachable, M, llvm::CodeModel::Medium, llvm::M68kII::MO_ABSOLUTE_ADDRESS, llvm::M68kII::MO_GOTPCREL, llvm::M68kII::MO_PC_RELATIVE_ADDRESS, llvm::TargetMachine::shouldAssumeDSOLocal(), llvm::CodeModel::Small, and TM.
Referenced by classifyGlobalReference().
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 152 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().
|
override |
Definition at line 65 of file M68kSubtarget.cpp.
References CallLoweringInfo.
|
inlineoverride |
Definition at line 151 of file M68kSubtarget.h.
References FrameLowering.
|
inlineoverride |
Definition at line 149 of file M68kSubtarget.h.
References InstrInfo.
Referenced by llvm::M68kCallLowering::lowerCall().
|
inlineoverride |
Definition at line 163 of file M68kSubtarget.h.
References InstrItins.
|
override |
Definition at line 69 of file M68kSubtarget.cpp.
References InstSelector.
unsigned M68kSubtarget::getJumpTableEncoding | ( | ) | const |
Definition at line 220 of file M68kSubtarget.cpp.
References atLeastM68020(), llvm::MachineJumpTableInfo::EK_BlockAddress, llvm::MachineJumpTableInfo::EK_Custom32, llvm::MachineJumpTableInfo::EK_LabelDifference32, llvm::TargetMachine::getCodeModel(), isPositionIndependent(), llvm::CodeModel::Medium, and TM.
Referenced by llvm::M68kTargetLowering::getJumpTableEncoding().
|
override |
Definition at line 73 of file M68kSubtarget.cpp.
|
override |
Definition at line 77 of file M68kSubtarget.cpp.
References RegBankInfo.
Referenced by llvm::M68kCallLowering::lowerCall().
|
inlineoverride |
Definition at line 155 of file M68kSubtarget.h.
References llvm::M68kInstrInfo::getRegisterInfo(), and InstrInfo.
Referenced by llvm::M68kFrameLowering::hasFP(), llvm::M68kCallLowering::lowerCall(), M68kSubtarget(), and llvm::M68kTargetLowering::M68kTargetLowering().
|
inlineoverride |
Definition at line 145 of file M68kSubtarget.h.
References TSInfo.
|
inline |
getSlotSize - Stack slot size in bytes.
Definition at line 139 of file M68kSubtarget.h.
Referenced by llvm::M68kFrameLowering::M68kFrameLowering().
|
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.
|
inlineoverride |
Definition at line 95 of file M68kSubtarget.h.
References TargetTriple.
M68kSubtarget & M68kSubtarget::initializeSubtargetDependencies | ( | StringRef | CPU, |
Triple | TT, | ||
StringRef | FS, | ||
const M68kTargetMachine & | TM | ||
) |
Definition at line 89 of file M68kSubtarget.cpp.
References llvm::X86AS::FS, InstrItins, ParseSubtargetFeatures(), selectM68kCPU(), stackAlignment, and llvm::StringRef::str().
bool M68kSubtarget::isLegalToCallImmediateAddr | ( | ) | const |
Return true if the subtarget allows calls to immediate address.
Definition at line 85 of file M68kSubtarget.cpp.
bool M68kSubtarget::isPositionIndependent | ( | ) | const |
Definition at line 81 of file M68kSubtarget.cpp.
References llvm::TargetMachine::isPositionIndependent(), and TM.
Referenced by classifyExternalReference(), classifyGlobalReference(), classifyLocalReference(), and getJumpTableEncoding().
|
inline |
Definition at line 104 of file M68kSubtarget.h.
References assert(), and UserReservedRegister.
Referenced by llvm::M68kRegisterInfo::getReservedRegs().
|
inline |
Definition at line 97 of file M68kSubtarget.h.
References llvm::Triple::isOSBinFormatELF(), and TargetTriple.
Parses features string setting specified subtarget options.
Definition of function is auto generated by tblgen.
Referenced by initializeSubtargetDependencies().
|
inline |
Definition at line 91 of file M68kSubtarget.h.
References UseSmallSection.
|
protected |
Definition at line 169 of file M68kSubtarget.h.
Referenced by getCallLowering(), and M68kSubtarget().
|
protected |
Definition at line 65 of file M68kSubtarget.h.
Referenced by getFrameLowering().
|
protected |
Definition at line 64 of file M68kSubtarget.h.
Referenced by getInstrInfo(), and getRegisterInfo().
|
protected |
Definition at line 56 of file M68kSubtarget.h.
Referenced by getInstrItineraryData(), and initializeSubtargetDependencies().
|
protected |
Definition at line 170 of file M68kSubtarget.h.
Referenced by getInstructionSelector(), and M68kSubtarget().
|
protected |
Definition at line 171 of file M68kSubtarget.h.
|
protected |
Definition at line 172 of file M68kSubtarget.h.
Referenced by getRegBankInfo(), and M68kSubtarget().
|
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 70 of file M68kSubtarget.h.
Referenced by getStackAlignment(), and initializeSubtargetDependencies().
|
protected |
Definition at line 52 of file M68kSubtarget.h.
Referenced by atLeastM68000(), atLeastM68010(), atLeastM68020(), atLeastM68030(), atLeastM68040(), and atLeastM68060().
|
protected |
Definition at line 72 of file M68kSubtarget.h.
Referenced by getTargetTriple(), and isTargetELF().
|
protected |
Definition at line 66 of file M68kSubtarget.h.
Referenced by getTargetLowering().
|
protected |
Definition at line 61 of file M68kSubtarget.h.
Referenced by classifyExternalReference(), classifyGlobalFunctionReference(), classifyGlobalReference(), classifyLocalReference(), getJumpTableEncoding(), isPositionIndependent(), and M68kSubtarget().
|
protected |
Definition at line 63 of file M68kSubtarget.h.
Referenced by getSelectionDAGInfo().
|
protected |
Definition at line 54 of file M68kSubtarget.h.
Referenced by isRegisterReservedByUser().
|
protected |
Small section is used.
Definition at line 59 of file M68kSubtarget.h.
Referenced by useSmallSection().