LLVM 20.0.0git
|
#include "Target/M68k/M68kSubtarget.h"
Protected Types | |
enum | SubtargetEnum { M00 , M10 , M20 , M30 , M40 , M60 } |
enum | FPKindEnum { M881 , M882 } |
Protected Attributes | |
SubtargetEnum | SubtargetKind = M00 |
std::optional< FPKindEnum > | FPUKind |
std::bitset< M68k::NUM_TARGET_REGS > | UserReservedRegister |
InstrItineraryData | InstrItins |
bool | UseSmallSection = true |
Small section is used. | |
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. | |
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 | |
---|---|
M881 | |
M882 |
Definition at line 54 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.
|
inline |
Definition at line 87 of file M68kSubtarget.h.
References M00, and SubtargetKind.
|
inline |
Definition at line 88 of file M68kSubtarget.h.
References M10, and SubtargetKind.
|
inline |
Definition at line 89 of file M68kSubtarget.h.
References M20, and SubtargetKind.
Referenced by classifyGlobalReference(), classifyLocalReference(), getJumpTableEncoding(), llvm::M68kTargetLowering::M68kTargetLowering(), and llvm::M68kTargetLowering::shouldExpandAtomicRMWInIR().
|
inline |
Definition at line 90 of file M68kSubtarget.h.
References M30, and SubtargetKind.
|
inline |
Definition at line 91 of file M68kSubtarget.h.
References M40, and SubtargetKind.
|
inline |
Definition at line 92 of file M68kSubtarget.h.
References M60, and SubtargetKind.
|
inline |
Definition at line 96 of file M68kSubtarget.h.
|
inline |
Definition at line 97 of file M68kSubtarget.h.
Classify a blockaddress reference for the current subtarget according to how we should reference it in a non-pcrel context.
Definition at line 162 of file M68kSubtarget.cpp.
References llvm::TargetMachine::getCodeModel(), isPositionIndependent(), llvm::CodeModel::Kernel, llvm::CodeModel::Large, llvm_unreachable, llvm::CodeModel::Medium, llvm::M68kII::MO_ABSOLUTE_ADDRESS, llvm::M68kII::MO_PC_RELATIVE_ADDRESS, llvm::CodeModel::Small, and TM.
Classify a external variable reference for the current subtarget according to how we should reference it in a non-pcrel context.
Definition at line 216 of file M68kSubtarget.cpp.
References classifyLocalReference(), isPositionIndependent(), llvm::M68kII::MO_GOT, llvm::M68kII::MO_GOTPCREL, llvm::TargetMachine::shouldAssumeDSOLocal(), and TM.
|
override |
Definition at line 281 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 286 of file M68kSubtarget.cpp.
References F, isPositionIndependent(), llvm::M68kII::MO_ABSOLUTE_ADDRESS, 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 227 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 231 of file M68kSubtarget.cpp.
References atLeastM68020(), classifyLocalReference(), llvm::TargetMachine::getCodeModel(), isPositionIndependent(), llvm::CodeModel::Kernel, llvm::CodeModel::Large, llvm_unreachable, llvm::CodeModel::Medium, llvm::M68kII::MO_ABSOLUTE_ADDRESS, llvm::M68kII::MO_GOTOFF, 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 182 of file M68kSubtarget.cpp.
References atLeastM68020(), llvm::TargetMachine::getCodeModel(), isPositionIndependent(), llvm::CodeModel::Kernel, llvm::CodeModel::Large, 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 157 of file M68kSubtarget.h.
References FrameLowering.
|
inlineoverride |
Definition at line 155 of file M68kSubtarget.h.
References InstrInfo.
Referenced by llvm::M68kCallLowering::lowerCall().
|
inlineoverride |
Definition at line 169 of file M68kSubtarget.h.
References InstrItins.
|
override |
Definition at line 69 of file M68kSubtarget.cpp.
References InstSelector.
unsigned M68kSubtarget::getJumpTableEncoding | ( | ) | const |
Definition at line 263 of file M68kSubtarget.cpp.
References atLeastM68020(), llvm::MachineJumpTableInfo::EK_BlockAddress, llvm::MachineJumpTableInfo::EK_Custom32, llvm::MachineJumpTableInfo::EK_LabelDifference32, llvm::TargetMachine::getCodeModel(), isPositionIndependent(), llvm::CodeModel::Large, 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 161 of file M68kSubtarget.h.
References llvm::M68kInstrInfo::getRegisterInfo(), and InstrInfo.
Referenced by llvm::M68kFrameLowering::hasFPImpl(), llvm::M68kCallLowering::lowerCall(), M68kSubtarget(), and llvm::M68kTargetLowering::M68kTargetLowering().
|
inlineoverride |
Definition at line 151 of file M68kSubtarget.h.
References TSInfo.
|
inline |
getSlotSize - Stack slot size in bytes.
Definition at line 145 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 142 of file M68kSubtarget.h.
References stackAlignment.
|
inlineoverride |
Definition at line 101 of file M68kSubtarget.h.
References TargetTriple.
|
inline |
Floating point support.
Definition at line 95 of file M68kSubtarget.h.
References FPUKind.
Referenced by atLeastM68881(), and atLeastM68882().
M68kSubtarget & M68kSubtarget::initializeSubtargetDependencies | ( | StringRef | CPU, |
Triple | TT, | ||
StringRef | FS, | ||
const M68kTargetMachine & | TM | ||
) |
Definition at line 87 of file M68kSubtarget.cpp.
References 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 classifyBlockAddressReference(), classifyExternalReference(), classifyGlobalFunctionReference(), classifyGlobalReference(), classifyLocalReference(), and getJumpTableEncoding().
Definition at line 110 of file M68kSubtarget.h.
References assert(), and UserReservedRegister.
Referenced by llvm::M68kRegisterInfo::getReservedRegs().
|
inline |
Definition at line 103 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 99 of file M68kSubtarget.h.
References UseSmallSection.
|
protected |
Definition at line 175 of file M68kSubtarget.h.
Referenced by getCallLowering(), and M68kSubtarget().
|
protected |
Definition at line 55 of file M68kSubtarget.h.
Referenced by atLeastM68881(), atLeastM68882(), and hasFPU().
|
protected |
Definition at line 68 of file M68kSubtarget.h.
Referenced by getFrameLowering().
|
protected |
Definition at line 67 of file M68kSubtarget.h.
Referenced by getInstrInfo(), and getRegisterInfo().
|
protected |
Definition at line 59 of file M68kSubtarget.h.
Referenced by getInstrItineraryData(), and initializeSubtargetDependencies().
|
protected |
Definition at line 176 of file M68kSubtarget.h.
Referenced by getInstructionSelector(), and M68kSubtarget().
|
protected |
Definition at line 177 of file M68kSubtarget.h.
|
protected |
Definition at line 178 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 73 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 75 of file M68kSubtarget.h.
Referenced by getTargetTriple(), and isTargetELF().
|
protected |
Definition at line 69 of file M68kSubtarget.h.
Referenced by getTargetLowering().
|
protected |
Definition at line 64 of file M68kSubtarget.h.
Referenced by classifyBlockAddressReference(), classifyExternalReference(), classifyGlobalFunctionReference(), classifyGlobalReference(), classifyLocalReference(), getJumpTableEncoding(), isPositionIndependent(), and M68kSubtarget().
|
protected |
Definition at line 66 of file M68kSubtarget.h.
Referenced by getSelectionDAGInfo().
|
protected |
Definition at line 57 of file M68kSubtarget.h.
Referenced by isRegisterReservedByUser().
Small section is used.
Definition at line 62 of file M68kSubtarget.h.
Referenced by useSmallSection().