LLVM 22.0.0git
|
#include "llvm/Target/TargetLoweringObjectFile.h"
Static Public Member Functions | |
static SectionKind | getKindForGlobal (const GlobalObject *GO, const TargetMachine &TM) |
Classify the specified global variable into a set of target independent categories embodied in SectionKind. |
Protected Member Functions | |
virtual MCSection * | SelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0 |
Protected Attributes | |
bool | SupportIndirectSymViaGOTPCRel = false |
bool | SupportGOTPCRelWithOffset = true |
bool | SupportDebugThreadLocalLocation = true |
uint32_t | PLTPCRelativeSpecifier = 0 |
unsigned | PersonalityEncoding = 0 |
PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH. | |
unsigned | LSDAEncoding = 0 |
unsigned | TTypeEncoding = 0 |
unsigned | CallSiteEncoding = 0 |
MCSection * | StaticCtorSection = nullptr |
This section contains the static constructor pointer list. | |
MCSection * | StaticDtorSection = nullptr |
This section contains the static destructor pointer list. | |
const TargetMachine * | TM = nullptr |
Protected Attributes inherited from llvm::MCObjectFileInfo | |
bool | SupportsWeakOmittedEHFrame = false |
True if target object file supports a weak_definition of constant 0 for an omitted EH frame. | |
bool | SupportsCompactUnwindWithoutEHFrame = false |
True if the target object file supports emitting a compact unwind section without an associated EH frame section. | |
bool | OmitDwarfIfHaveCompactUnwind = false |
OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with compact unwind and other with dwarf unwind. | |
unsigned | FDECFIEncoding = 0 |
FDE CFI encoding. | |
unsigned | CompactUnwindDwarfEHFrameOnly = 0 |
Compact unwind encoding indicating that we should emit only an EH frame. | |
std::optional< sframe::ABI > | SFrameABIArch = {} |
SFrame ABI architecture byte. | |
MCSection * | TextSection = nullptr |
Section directive for standard text. | |
MCSection * | DataSection = nullptr |
Section directive for standard data. | |
MCSection * | BSSSection = nullptr |
Section that is default initialized to zero. | |
MCSection * | ReadOnlySection = nullptr |
Section that is readonly and can contain arbitrary initialized data. | |
MCSection * | LSDASection = nullptr |
If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to. | |
MCSection * | CallGraphSection = nullptr |
Section containing call graph metadata. | |
MCSection * | CompactUnwindSection = nullptr |
If exception handling is supported by the target and the target can support a compact representation of the CIE and FDE, this is the section to emit them into. | |
MCSection * | ImportCallSection = nullptr |
If import call optimization is supported by the target, this is the section to emit import call data to. | |
MCSection * | DwarfAbbrevSection = nullptr |
MCSection * | DwarfInfoSection = nullptr |
MCSection * | DwarfLineSection = nullptr |
MCSection * | DwarfLineStrSection = nullptr |
MCSection * | DwarfFrameSection = nullptr |
MCSection * | DwarfPubTypesSection = nullptr |
const MCSection * | DwarfDebugInlineSection = nullptr |
MCSection * | DwarfStrSection = nullptr |
MCSection * | DwarfLocSection = nullptr |
MCSection * | DwarfARangesSection = nullptr |
MCSection * | DwarfRangesSection = nullptr |
MCSection * | DwarfMacinfoSection = nullptr |
MCSection * | DwarfMacroSection = nullptr |
MCSection * | DwarfPubNamesSection = nullptr |
MCSection * | DwarfDebugNamesSection = nullptr |
Accelerator table sections. | |
MCSection * | DwarfAccelNamesSection = nullptr |
MCSection * | DwarfAccelObjCSection = nullptr |
MCSection * | DwarfAccelNamespaceSection = nullptr |
MCSection * | DwarfAccelTypesSection = nullptr |
MCSection * | DwarfInfoDWOSection = nullptr |
MCSection * | DwarfTypesDWOSection = nullptr |
MCSection * | DwarfAbbrevDWOSection = nullptr |
MCSection * | DwarfStrDWOSection = nullptr |
MCSection * | DwarfLineDWOSection = nullptr |
MCSection * | DwarfLocDWOSection = nullptr |
MCSection * | DwarfStrOffDWOSection = nullptr |
MCSection * | DwarfMacinfoDWOSection = nullptr |
MCSection * | DwarfMacroDWOSection = nullptr |
MCSection * | DwarfStrOffSection = nullptr |
The DWARF v5 string offset and address table sections. | |
MCSection * | DwarfAddrSection = nullptr |
MCSection * | DwarfRnglistsSection = nullptr |
The DWARF v5 range list section. | |
MCSection * | DwarfLoclistsSection = nullptr |
The DWARF v5 locations list section. | |
MCSection * | DwarfRnglistsDWOSection = nullptr |
The DWARF v5 range and location list sections for fission. | |
MCSection * | DwarfLoclistsDWOSection = nullptr |
MCSection * | DwarfCUIndexSection = nullptr |
MCSection * | DwarfTUIndexSection = nullptr |
MCSection * | DwarfGnuPubNamesSection = nullptr |
Section for newer gnu pubnames. | |
MCSection * | DwarfGnuPubTypesSection = nullptr |
Section for newer gnu pubtypes. | |
MCSection * | DwarfSwiftASTSection = nullptr |
MCSection * | COFFDebugSymbolsSection = nullptr |
MCSection * | COFFDebugTypesSection = nullptr |
MCSection * | COFFGlobalTypeHashesSection = nullptr |
MCSection * | TLSExtraDataSection = nullptr |
Extra TLS Variable Data section. | |
MCSection * | TLSDataSection = nullptr |
Section directive for Thread Local data. ELF, MachO, COFF, and Wasm. | |
MCSection * | TLSBSSSection = nullptr |
Section directive for Thread Local uninitialized data. | |
MCSection * | StackMapSection = nullptr |
StackMap section. | |
MCSection * | FaultMapSection = nullptr |
FaultMap section. | |
MCSection * | RemarksSection = nullptr |
Remarks section. | |
MCSection * | EHFrameSection = nullptr |
EH frame section. | |
MCSection * | SFrameSection = nullptr |
SFrame section. | |
MCSection * | StackSizesSection = nullptr |
Section containing metadata on function stack sizes. | |
MCSection * | PseudoProbeSection = nullptr |
Section for pseudo probe information used by AutoFDO. | |
MCSection * | PseudoProbeDescSection = nullptr |
MCSection * | LLVMStatsSection = nullptr |
MCSection * | DataRelROSection = nullptr |
MCSection * | MergeableConst4Section = nullptr |
MCSection * | MergeableConst8Section = nullptr |
MCSection * | MergeableConst16Section = nullptr |
MCSection * | MergeableConst32Section = nullptr |
MCSection * | TLSTLVSection = nullptr |
Section for thread local structure information. | |
const MCSection * | TLSThreadInitSection = nullptr |
Section for thread local data initialization functions. | |
MCSection * | CStringSection = nullptr |
MCSection * | UStringSection = nullptr |
MCSection * | TextCoalSection = nullptr |
MCSection * | ConstTextCoalSection = nullptr |
MCSection * | ConstDataSection = nullptr |
MCSection * | DataCoalSection = nullptr |
MCSection * | ConstDataCoalSection = nullptr |
MCSection * | DataCommonSection = nullptr |
MCSection * | DataBSSSection = nullptr |
MCSection * | FourByteConstantSection = nullptr |
MCSection * | EightByteConstantSection = nullptr |
MCSection * | SixteenByteConstantSection = nullptr |
MCSection * | LazySymbolPointerSection = nullptr |
MCSection * | NonLazySymbolPointerSection = nullptr |
MCSection * | ThreadLocalPointerSection = nullptr |
MCSection * | AddrSigSection = nullptr |
MCSection * | DrectveSection = nullptr |
COFF specific sections. | |
MCSection * | PDataSection = nullptr |
MCSection * | XDataSection = nullptr |
MCSection * | SXDataSection = nullptr |
MCSection * | GEHContSection = nullptr |
MCSection * | GFIDsSection = nullptr |
MCSection * | GIATsSection = nullptr |
MCSection * | GLJMPSection = nullptr |
MCSection * | PPA2ListSection = nullptr |
MCSection * | ADASection = nullptr |
MCSection * | IDRLSection = nullptr |
MCSection * | TOCBaseSection = nullptr |
MCSection * | ReadOnly8Section = nullptr |
MCSection * | ReadOnly16Section = nullptr |
std::array< MCSection *, binaryformat::Swift5ReflectionSectionKind::last > | Swift5ReflectionSections = {} |
Definition at line 47 of file TargetLoweringObjectFile.h.
|
default |
Referenced by operator=(), and TargetLoweringObjectFile().
|
delete |
References TargetLoweringObjectFile().
|
virtual |
Definition at line 55 of file TargetLoweringObjectFile.cpp.
void TargetLoweringObjectFile::emitCGProfileMetadata | ( | MCStreamer & | Streamer, |
Module & | M ) const |
Emit Call Graph Profile metadata.
Definition at line 148 of file TargetLoweringObjectFile.cpp.
References llvm::CallingConv::C, llvm::cast(), llvm::Count, llvm::MCSymbolRefExpr::create(), llvm::MCStreamer::emitCGProfileEntry(), F, llvm::MCObjectFileInfo::getContext(), llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, llvm::MDNode::operands(), and TM.
Referenced by llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), and llvm::TargetLoweringObjectFileMachO::emitModuleMetadata().
|
inlinevirtual |
Process linker options metadata and emit platform-specific bits.
Reimplemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, and llvm::TargetLoweringObjectFileMachO.
Definition at line 102 of file TargetLoweringObjectFile.h.
|
inlinevirtual |
Emit the module-level metadata that the platform cares about.
Reimplemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, and llvm::TargetLoweringObjectFileMachO.
Definition at line 91 of file TargetLoweringObjectFile.h.
Referenced by llvm::AsmPrinter::doFinalization().
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 144 of file TargetLoweringObjectFile.cpp.
Referenced by llvm::DwarfCFIException::endModule().
void TargetLoweringObjectFile::emitPseudoProbeDescMetadata | ( | MCStreamer & | Streamer, |
Module & | M, | ||
std::function< void(MCStreamer &Streamer)> | COMDATSymEmitter = nullptr ) const |
Emit pseudo_probe_desc metadata.
Definition at line 194 of file TargetLoweringObjectFile.cpp.
References llvm::CallingConv::C, llvm::cast(), llvm::MCStreamer::emitBytes(), llvm::MCStreamer::emitInt64(), llvm::MCStreamer::emitULEB128IntValue(), llvm::mdconst::extract(), llvm::MCObjectFileInfo::getContext(), llvm::NamedMDNode::operands(), llvm::PseudoProbeDescMetadataName, llvm::MCStreamer::switchSection(), and TM.
Referenced by llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), and llvm::TargetLoweringObjectFileELF::emitModuleMetadata().
unsigned TargetLoweringObjectFile::getCallSiteEncoding | ( | ) | const |
Definition at line 59 of file TargetLoweringObjectFile.cpp.
References CallSiteEncoding, llvm::dwarf::DW_EH_PE_udata4, and llvm::MCObjectFileInfo::getContext().
|
virtual |
Reimplemented in llvm::AArch64_MachoTargetObjectFile, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, and llvm::X86_64MachoTargetObjectFile.
Definition at line 138 of file TargetLoweringObjectFile.cpp.
References TM.
Referenced by llvm::DwarfCFIException::beginBasicBlockSection(), llvm::WinException::beginFunclet(), and getExplicitSectionGlobal().
|
virtual |
Create a symbol reference to describe the given TLS variable when emitting the address in debug info.
Reimplemented in llvm::ARMElfTargetObjectFile, llvm::MipsTargetObjectFile, llvm::SystemZELFTargetObjectFile, and llvm::X86ELFTargetObjectFile.
Definition at line 478 of file TargetLoweringObjectFile.cpp.
References llvm::MCSymbolRefExpr::create(), and llvm::MCObjectFileInfo::getContext().
|
pure virtual |
Targets should implement this method to assign a section to globals with an explicit section specfied.
The implementation of this method can assume that GO->hasSection() is true.
Implemented in DXILTargetObjectFile, llvm::AArch64_ELFTargetObjectFile, llvm::AMDGPUTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::HexagonTargetObjectFile, llvm::NVPTXTargetObjectFile, llvm::SPIRVTargetObjectFile, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileGOFF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileWasm, llvm::TargetLoweringObjectFileXCOFF, and llvm::XCoreTargetObjectFile.
References getCFIPersonalitySymbol(), getSymbolWithGlobalValueBase(), getTTypeGlobalReference(), and TM.
Referenced by SectionForGlobal().
|
inlinevirtual |
If supported, return the function entry point symbol.
Otherwise, returns nullptr. Func must be a function or an alias which has a function as base object.
Reimplemented in llvm::TargetLoweringObjectFileXCOFF.
Definition at line 303 of file TargetLoweringObjectFile.h.
References TM.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::SetupMachineFunction(), and transformCallee().
|
inlinevirtual |
Get the target specific PC relative GOT entry relocation.
Reimplemented in llvm::AArch64_ELFTargetObjectFile, llvm::AArch64_MachoTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::TargetLoweringObjectFileMachO, llvm::X86_64ELFTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 254 of file TargetLoweringObjectFile.h.
References llvm::Offset.
Referenced by handleIndirectSymViaGOTPCRel().
|
inlinevirtual |
Get the target specific RWPI relocation.
Reimplemented in llvm::ARMElfTargetObjectFile.
Definition at line 249 of file TargetLoweringObjectFile.h.
|
static |
Classify the specified global variable into a set of target independent categories embodied in SectionKind.
getKindForGlobal - This is a top-level target-independent classifier for a global object.
Given a global variable and information from the TM, this function classifies the global in a target independent manner. This function may be overridden by the target implementation.
Definition at line 233 of file TargetLoweringObjectFile.cpp.
References assert(), llvm::CallingConv::C, llvm::cast(), llvm::dyn_cast(), llvm::SectionKind::getBSS(), llvm::SectionKind::getBSSExtern(), llvm::SectionKind::getBSSLocal(), llvm::SectionKind::getCommon(), llvm::SectionKind::getData(), llvm::SectionKind::getExclude(), llvm::SectionKind::getMergeable1ByteCString(), llvm::SectionKind::getMergeable2ByteCString(), llvm::SectionKind::getMergeable4ByteCString(), llvm::SectionKind::getMergeableConst16(), llvm::SectionKind::getMergeableConst32(), llvm::SectionKind::getMergeableConst4(), llvm::SectionKind::getMergeableConst8(), llvm::SectionKind::getReadOnly(), llvm::SectionKind::getReadOnlyWithRel(), llvm::SectionKind::getText(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadBSSLocal(), llvm::SectionKind::getThreadData(), llvm::isa(), llvm::GlobalValue::isDeclarationForLinker(), IsNullTerminatedString(), isSuitableForBSS(), llvm::Reloc::ROPI, llvm::Reloc::ROPI_RWPI, llvm::Reloc::RWPI, llvm::Reloc::Static, and TM.
Referenced by llvm::AsmPrinter::emitGlobalVariable(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetLoweringObjectFileXCOFF::getTargetSymbol(), llvm::SystemZSubtarget::isAddressedViaADA(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::TargetMachine::isLargeGlobalValue(), and SectionForGlobal().
|
inline |
Definition at line 191 of file TargetLoweringObjectFile.h.
References LSDAEncoding.
Referenced by llvm::DwarfCFIException::beginBasicBlockSection(), llvm::DwarfCFIException::beginFunction(), and llvm::WinException::beginFunction().
|
inline |
Definition at line 79 of file TargetLoweringObjectFile.h.
Referenced by llvm::TargetLoweringObjectFileCOFF::emitLinkerDirectives(), llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), llvm::AArch64_MachoTargetObjectFile::getNameWithPrefix(), llvm::TargetLoweringObjectFileCOFF::getNameWithPrefix(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetLoweringObjectFileELF::getSectionForJumpTable(), llvm::TargetMachine::getSymbol(), llvm::TargetLoweringObjectFileELF::getUniqueSectionForFunction(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal().
|
inlinevirtual |
Get the module-level metadata that the platform cares about.
Reimplemented in llvm::RISCVELFTargetObjectFile, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileGOFF, and llvm::TargetLoweringObjectFileWasm.
Definition at line 105 of file TargetLoweringObjectFile.h.
|
virtual |
Reimplemented in llvm::AArch64_MachoTargetObjectFile, llvm::TargetLoweringObjectFileCOFF, and llvm::TargetLoweringObjectFileMachO.
Definition at line 484 of file TargetLoweringObjectFile.cpp.
References TM.
Referenced by llvm::TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(), llvm::TargetMachine::getNameWithPrefix(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), llvm::TargetLoweringObjectFileXCOFF::getSectionForFunctionDescriptor(), llvm::TargetLoweringObjectFileXCOFF::getSectionForJumpTable(), and llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal().
|
inline |
Definition at line 190 of file TargetLoweringObjectFile.h.
References PersonalityEncoding.
Referenced by llvm::DwarfCFIException::beginBasicBlockSection(), llvm::DwarfCFIException::beginFunction(), llvm::WinException::beginFunction(), llvm::DwarfCFIException::endModule(), and llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol().
|
inlinevirtual |
If supported, return the section to use for the llvm.commandline metadata.
Otherwise, return nullptr.
Reimplemented in llvm::TargetLoweringObjectFileELF, and llvm::TargetLoweringObjectFileMachO.
Definition at line 265 of file TargetLoweringObjectFile.h.
|
virtual |
Given a constant with the SectionKind, return a section that it should be placed in.
Given a mergable constant with the specified size and relocation information, return a section that it should be placed in.
Reimplemented in llvm::LanaiTargetObjectFile, llvm::MipsTargetObjectFile, llvm::NVPTXTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::SPIRVTargetObjectFile, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileXCOFF, and llvm::XCoreTargetObjectFile.
Definition at line 414 of file TargetLoweringObjectFile.cpp.
References llvm::CallingConv::C, llvm::MCObjectFileInfo::DataSection, DL, and llvm::MCObjectFileInfo::ReadOnlySection.
Referenced by llvm::AsmPrinter::emitConstantPool(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::AsmPrinter::GetCPISymbol(), getSectionForConstant(), llvm::TargetLoweringObjectFileCOFF::getSectionForConstant(), and getSectionForJumpTable().
|
virtual |
Similar to the function above, but append SectionSuffix
to the section name.
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 423 of file TargetLoweringObjectFile.cpp.
References llvm::CallingConv::C, DL, llvm::StringRef::empty(), getSectionForConstant(), and llvm::report_fatal_error().
|
inlinevirtual |
On targets that associate external references with a section, return such a section for the given external global.
Reimplemented in llvm::TargetLoweringObjectFileXCOFF.
Definition at line 288 of file TargetLoweringObjectFile.h.
References TM.
|
inlinevirtual |
On targets that use separate function descriptor symbols, return a section for the descriptor given its symbol.
Use only with defined functions.
Reimplemented in llvm::TargetLoweringObjectFileXCOFF.
Definition at line 272 of file TargetLoweringObjectFile.h.
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 383 of file TargetLoweringObjectFile.cpp.
References F, getSectionForJumpTable(), and TM.
Referenced by getSectionForJumpTable().
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 388 of file TargetLoweringObjectFile.cpp.
References F, llvm::SectionKind::getReadOnly(), getSectionForConstant(), and TM.
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileGOFF, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 156 of file TargetLoweringObjectFile.h.
References llvm::MCObjectFileInfo::LSDASection.
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 435 of file TargetLoweringObjectFile.cpp.
|
inlinevirtual |
On targets that support TOC entries, return a section for the entry given the symbol it refers to.
TODO: Implement this interface for existing ELF targets.
Reimplemented in llvm::TargetLoweringObjectFileXCOFF.
Definition at line 280 of file TargetLoweringObjectFile.h.
References TM.
|
inlinevirtual |
Returns the register used as static base in RWPI variants.
Reimplemented in llvm::ARMElfTargetObjectFile.
Definition at line 246 of file TargetLoweringObjectFile.h.
References llvm::MCRegister::NoRegister.
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileWasm, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 198 of file TargetLoweringObjectFile.h.
References StaticCtorSection.
Referenced by llvm::AsmPrinter::emitXXStructorList().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileWasm, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 203 of file TargetLoweringObjectFile.h.
References StaticDtorSection.
Referenced by llvm::AsmPrinter::emitXXStructorList().
MCSymbol * TargetLoweringObjectFile::getSymbolWithGlobalValueBase | ( | const GlobalValue * | GV, |
StringRef | Suffix, | ||
const TargetMachine & | TM ) const |
Return the MCSymbol for a private symbol with global value name as its base, with the specified suffix.
Definition at line 127 of file TargetLoweringObjectFile.cpp.
References llvm::SmallString< InternalLen >::append(), assert(), llvm::StringRef::begin(), llvm::StringRef::empty(), llvm::StringRef::end(), llvm::MCObjectFileInfo::getContext(), llvm::GlobalValue::getDataLayout(), llvm::MCContext::getOrCreateSymbol(), llvm::DataLayout::getPrivateGlobalPrefix(), and TM.
Referenced by llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), getExplicitSectionGlobal(), llvm::AsmPrinter::getSymbolWithGlobalValueBase(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), and llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference().
|
inlinevirtual |
Targets that have a special convention for their symbols could use this hook to return a specialized symbol.
Reimplemented in llvm::TargetLoweringObjectFileXCOFF.
Definition at line 295 of file TargetLoweringObjectFile.h.
References TM.
Referenced by llvm::TargetMachine::getSymbol().
|
inline |
Definition at line 192 of file TargetLoweringObjectFile.h.
References TTypeEncoding.
|
virtual |
Return an MCExpr to use for a reference to the specified global variable from exception handling information.
getTTypeGlobalReference - Return an MCExpr to use for a reference to the specified global variable from exception handling information.
Reimplemented in llvm::AArch64_MachoTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, and llvm::X86_64MachoTargetObjectFile.
Definition at line 449 of file TargetLoweringObjectFile.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCObjectFileInfo::getContext(), getTTypeReference(), llvm::Ref, and TM.
Referenced by llvm::AsmPrinter::emitTTypeReference(), getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), and llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference().
const MCExpr * TargetLoweringObjectFile::getTTypeReference | ( | const MCSymbolRefExpr * | Sym, |
unsigned | Encoding, | ||
MCStreamer & | Streamer ) const |
Definition at line 458 of file TargetLoweringObjectFile.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::MCContext::createTempSymbol(), llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_pcrel, llvm::MCStreamer::emitLabel(), llvm::MCObjectFileInfo::getContext(), and llvm::report_fatal_error().
Referenced by getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), and llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference().
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 441 of file TargetLoweringObjectFile.cpp.
|
inline |
Target supports a PC-relative relocation that references the PLT of a function.
Definition at line 220 of file TargetLoweringObjectFile.h.
References PLTPCRelativeSpecifier.
|
virtual |
This method must be called before any actual lowering is done.
Initialize - this method must be called before any actual lowering is done.
This specifies the current context for codegen, and gives the lowering implementations a chance to set up their default sections.
Reimplemented in llvm::ARMElfTargetObjectFile, llvm::AVRTargetObjectFile, llvm::CSKYELFTargetObjectFile, llvm::HexagonTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::M68kELFTargetObjectFile, llvm::MipsTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::SPIRVTargetObjectFile, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileXCOFF, llvm::WebAssemblyTargetObjectFile, and llvm::XCoreTargetObjectFile.
Definition at line 40 of file TargetLoweringObjectFile.cpp.
References CallSiteEncoding, llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_uleb128, llvm::MCObjectFileInfo::initMCObjectFileInfo(), llvm::CodeModel::Large, LSDAEncoding, PersonalityEncoding, TM, and TTypeEncoding.
Referenced by llvm::SPIRVTargetObjectFile::Initialize(), llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileXCOFF::Initialize(), and llvm::WebAssemblyTargetObjectFile::Initialize().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 222 of file TargetLoweringObjectFile.h.
Referenced by llvm::AsmPrinter::lowerConstant().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileCOFF.
Definition at line 212 of file TargetLoweringObjectFile.h.
Referenced by llvm::AsmPrinter::lowerConstant().
|
delete |
References TargetLoweringObjectFile().
MCSection * TargetLoweringObjectFile::SectionForGlobal | ( | const GlobalObject * | GO, |
const TargetMachine & | TM ) const |
This method computes the appropriate section to emit the specified global variable or function definition.
This should not be passed external (or available externally) globals.
Definition at line 378 of file TargetLoweringObjectFile.cpp.
References getKindForGlobal(), SectionForGlobal(), and TM.
MCSection * TargetLoweringObjectFile::SectionForGlobal | ( | const GlobalObject * | GO, |
SectionKind | Kind, | ||
const TargetMachine & | TM ) const |
This method computes the appropriate section to emit the specified global variable or function definition.
This should not be passed external (or available externally) globals.
Definition at line 354 of file TargetLoweringObjectFile.cpp.
References llvm::dyn_cast(), getExplicitSectionGlobal(), llvm::GlobalObject::hasSection(), SelectSectionForGlobal(), and TM.
Referenced by llvm::XtensaAsmPrinter::emitConstantPool(), llvm::AsmPrinter::emitGlobalVariable(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetLoweringObjectFileXCOFF::getTargetSymbol(), and SectionForGlobal().
|
protectedpure virtual |
Implemented in DXILTargetObjectFile, llvm::AArch64_ELFTargetObjectFile, llvm::AMDGPUTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::AVRTargetObjectFile, llvm::HexagonTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::MipsTargetObjectFile, llvm::NVPTXTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::SPIRVTargetObjectFile, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileGOFF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileWasm, llvm::TargetLoweringObjectFileXCOFF, and llvm::XCoreTargetObjectFile.
References TM.
Referenced by SectionForGlobal().
|
virtual |
Reimplemented in llvm::HexagonTargetObjectFile, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileWasm, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 397 of file TargetLoweringObjectFile.cpp.
References F.
Referenced by llvm::TargetLoweringObjectFileCOFF::shouldPutJumpTableInFunctionSection().
|
inline |
Target supports TLS offset relocation in debug section?
Definition at line 241 of file TargetLoweringObjectFile.h.
References SupportDebugThreadLocalLocation.
|
inline |
Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
Definition at line 236 of file TargetLoweringObjectFile.h.
References SupportGOTPCRelWithOffset.
Referenced by handleIndirectSymViaGOTPCRel().
|
inline |
Target supports replacing a data "PC"-relative access to a symbol through another symbol, by accessing the later via a GOT entry instead?
Definition at line 230 of file TargetLoweringObjectFile.h.
References SupportIndirectSymViaGOTPCRel.
Referenced by emitGlobalConstantImpl().
|
protected |
Definition at line 62 of file TargetLoweringObjectFile.h.
Referenced by getCallSiteEncoding(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), and llvm::TargetLoweringObjectFileXCOFF::Initialize().
|
protected |
Definition at line 60 of file TargetLoweringObjectFile.h.
Referenced by getLSDAEncoding(), llvm::CSKYELFTargetObjectFile::Initialize(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), and llvm::TargetLoweringObjectFileXCOFF::Initialize().
|
protected |
PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.
Definition at line 59 of file TargetLoweringObjectFile.h.
Referenced by getPersonalityEncoding(), llvm::CSKYELFTargetObjectFile::Initialize(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), and llvm::TargetLoweringObjectFileXCOFF::Initialize().
|
protected |
Definition at line 55 of file TargetLoweringObjectFile.h.
Referenced by hasPLTPCRelative(), llvm::RISCVELFTargetObjectFile::Initialize(), and llvm::TargetLoweringObjectFileELF::lowerSymbolDifference().
|
protected |
This section contains the static constructor pointer list.
Definition at line 65 of file TargetLoweringObjectFile.h.
Referenced by getStaticCtorSection(), llvm::TargetLoweringObjectFileCOFF::getStaticCtorSection(), llvm::TargetLoweringObjectFileWasm::getStaticCtorSection(), llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileELF::InitializeELF(), and llvm::TargetLoweringObjectFileWasm::InitializeWasm().
|
protected |
This section contains the static destructor pointer list.
Definition at line 68 of file TargetLoweringObjectFile.h.
Referenced by getStaticDtorSection(), llvm::TargetLoweringObjectFileCOFF::getStaticDtorSection(), llvm::TargetLoweringObjectFileMachO::getStaticDtorSection(), llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), and llvm::TargetLoweringObjectFileELF::InitializeELF().
|
protected |
Definition at line 54 of file TargetLoweringObjectFile.h.
Referenced by llvm::TargetLoweringObjectFileXCOFF::Initialize(), and supportDebugThreadLocalLocation().
|
protected |
Definition at line 53 of file TargetLoweringObjectFile.h.
Referenced by llvm::AArch64_MachoTargetObjectFile::AArch64_MachoTargetObjectFile(), and supportGOTPCRelWithOffset().
|
protected |
Definition at line 52 of file TargetLoweringObjectFile.h.
Referenced by llvm::ARMElfTargetObjectFile::ARMElfTargetObjectFile(), llvm::RISCVELFTargetObjectFile::Initialize(), supportIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO(), and llvm::X86_64ELFTargetObjectFile::X86_64ELFTargetObjectFile().
|
protected |
Definition at line 70 of file TargetLoweringObjectFile.h.
Referenced by emitCGProfileMetadata(), emitPseudoProbeDescMetadata(), llvm::AArch64_ELFTargetObjectFile::getAuthPtrSlotSymbol(), llvm::AArch64_MachoTargetObjectFile::getAuthPtrSlotSymbol(), llvm::AArch64_MachoTargetObjectFile::getCFIPersonalitySymbol(), getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::X86_64MachoTargetObjectFile::getCFIPersonalitySymbol(), DXILTargetObjectFile::getExplicitSectionGlobal(), llvm::AArch64_ELFTargetObjectFile::getExplicitSectionGlobal(), llvm::AMDGPUTargetObjectFile::getExplicitSectionGlobal(), llvm::ARMElfTargetObjectFile::getExplicitSectionGlobal(), llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::NVPTXTargetObjectFile::getExplicitSectionGlobal(), llvm::SPIRVTargetObjectFile::getExplicitSectionGlobal(), getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileGOFF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(), llvm::XCoreTargetObjectFile::getExplicitSectionGlobal(), getFunctionEntryPointSymbol(), llvm::TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(), getKindForGlobal(), llvm::AArch64_MachoTargetObjectFile::getNameWithPrefix(), getNameWithPrefix(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), getSectionForExternalReference(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), getSectionForFunctionDescriptor(), llvm::TargetLoweringObjectFileXCOFF::getSectionForFunctionDescriptor(), getSectionForJumpTable(), getSectionForJumpTable(), llvm::TargetLoweringObjectFileELF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileELF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileXCOFF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileELF::getSectionForLSDA(), llvm::TargetLoweringObjectFileGOFF::getSectionForLSDA(), llvm::TargetLoweringObjectFileXCOFF::getSectionForLSDA(), getSectionForMachineBasicBlock(), llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(), getSectionForTOCEntry(), llvm::TargetLoweringObjectFileXCOFF::getSectionForTOCEntry(), getSymbolWithGlobalValueBase(), getTargetSymbol(), llvm::TargetLoweringObjectFileXCOFF::getTargetSymbol(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), getUniqueSectionForFunction(), llvm::TargetLoweringObjectFileELF::getUniqueSectionForFunction(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::CSKYELFTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::SPIRVTargetObjectFile::Initialize(), Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::WebAssemblyTargetObjectFile::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::isGlobalInSmallSection(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::RISCVELFTargetObjectFile::isGlobalInSmallSection(), llvm::HexagonTargetObjectFile::isSmallDataEnabled(), lowerDSOLocalEquivalent(), llvm::TargetLoweringObjectFileELF::lowerDSOLocalEquivalent(), lowerRelativeReference(), SectionForGlobal(), SectionForGlobal(), DXILTargetObjectFile::SelectSectionForGlobal(), llvm::AArch64_ELFTargetObjectFile::SelectSectionForGlobal(), llvm::AMDGPUTargetObjectFile::SelectSectionForGlobal(), llvm::ARMElfTargetObjectFile::SelectSectionForGlobal(), llvm::AVRTargetObjectFile::SelectSectionForGlobal(), llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::LanaiTargetObjectFile::SelectSectionForGlobal(), llvm::NVPTXTargetObjectFile::SelectSectionForGlobal(), llvm::RISCVELFTargetObjectFile::SelectSectionForGlobal(), llvm::SPIRVTargetObjectFile::SelectSectionForGlobal(), SelectSectionForGlobal(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileGOFF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), llvm::SparcELFTargetObjectFile::SparcELFTargetObjectFile(), llvm::TargetLoweringObjectFileELF::~TargetLoweringObjectFileELF(), llvm::TargetLoweringObjectFileGOFF::~TargetLoweringObjectFileGOFF(), llvm::TargetLoweringObjectFileMachO::~TargetLoweringObjectFileMachO(), llvm::TargetLoweringObjectFileWasm::~TargetLoweringObjectFileWasm(), and llvm::TargetLoweringObjectFileXCOFF::~TargetLoweringObjectFileXCOFF().
|
protected |
Definition at line 61 of file TargetLoweringObjectFile.h.
Referenced by getTTypeEncoding(), llvm::CSKYELFTargetObjectFile::Initialize(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileXCOFF::Initialize(), and llvm::TargetLoweringObjectFileWasm::InitializeWasm().