LLVM 20.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 |
bool | SupportDSOLocalEquivalentLowering = false |
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. | |
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 * | 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 * | 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 * | 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 * | PPA1Section = nullptr |
MCSection * | PPA2Section = 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 45 of file TargetLoweringObjectFile.h.
|
default |
|
delete |
|
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::MCSymbolRefExpr::create(), llvm::MCStreamer::emitCGProfileEntry(), F, From, llvm::MCObjectFileInfo::getContext(), llvm::MDNode::getOperand(), llvm::TargetMachine::getSymbol(), llvm::MDNode::operands(), TM, and llvm::MCSymbolRefExpr::VK_None.
Referenced by llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), and llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata().
|
inlinevirtual |
Emit the module-level metadata that the platform cares about.
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, and llvm::TargetLoweringObjectFileCOFF.
Definition at line 89 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().
unsigned TargetLoweringObjectFile::getCallSiteEncoding | ( | ) | const |
Definition at line 59 of file TargetLoweringObjectFile.cpp.
References CallSiteEncoding, llvm::dwarf::DW_EH_PE_udata4, and llvm::MCObjectFileInfo::getContext().
Referenced by llvm::EHStreamer::emitExceptionTable().
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::AArch64_MachoTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 138 of file TargetLoweringObjectFile.cpp.
References llvm::TargetMachine::getSymbol(), and TM.
Referenced by llvm::DwarfCFIException::beginBasicBlockSection(), and llvm::WinException::beginFunclet().
|
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 426 of file TargetLoweringObjectFile.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCObjectFileInfo::getContext(), and Sym.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute().
|
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 llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileWasm, llvm::TargetLoweringObjectFileXCOFF, llvm::TargetLoweringObjectFileGOFF, llvm::AMDGPUTargetObjectFile, llvm::ARMElfTargetObjectFile, DXILTargetObjectFile, llvm::HexagonTargetObjectFile, llvm::NVPTXTargetObjectFile, llvm::SPIRVTargetObjectFile, and llvm::XCoreTargetObjectFile.
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 283 of file TargetLoweringObjectFile.h.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::SetupMachineFunction(), and transformCallee().
|
inlinevirtual |
Get the target specific PC relative GOT entry relocation.
Reimplemented in llvm::TargetLoweringObjectFileMachO, llvm::AArch64_ELFTargetObjectFile, llvm::AArch64_MachoTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::X86_64MachoTargetObjectFile, and llvm::X86_64ELFTargetObjectFile.
Definition at line 234 of file TargetLoweringObjectFile.h.
Referenced by handleIndirectSymViaGOTPCRel().
|
inlinevirtual |
Get the target specific RWPI relocation.
Reimplemented in llvm::ARMElfTargetObjectFile.
Definition at line 229 of file TargetLoweringObjectFile.h.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute().
|
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 199 of file TargetLoweringObjectFile.cpp.
References assert(), llvm::CallingConv::C, 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::TargetMachine::getRelocationModel(), llvm::SectionKind::getText(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadBSSLocal(), llvm::SectionKind::getThreadData(), llvm::GlobalValue::isDeclarationForLinker(), IsNullTerminatedString(), isSuitableForBSS(), llvm::TargetOptions::NoZerosInBSS, llvm::TargetMachine::Options, llvm::Reloc::ROPI, llvm::Reloc::ROPI_RWPI, llvm::Reloc::RWPI, llvm::Reloc::Static, and TM.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), llvm::AsmPrinter::emitGlobalVariable(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetLoweringObjectFileXCOFF::getTargetSymbol(), llvm::SystemZSubtarget::isAddressedViaADA(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), and SectionForGlobal().
|
inline |
Definition at line 170 of file TargetLoweringObjectFile.h.
References LSDAEncoding.
Referenced by llvm::DwarfCFIException::beginBasicBlockSection(), llvm::DwarfCFIException::beginFunction(), and llvm::WinException::beginFunction().
|
inline |
Definition at line 77 of file TargetLoweringObjectFile.h.
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetLoweringObjectFileCOFF::getNameWithPrefix(), llvm::AArch64_MachoTargetObjectFile::getNameWithPrefix(), llvm::TargetLoweringObjectFileELF::getSectionForJumpTable(), llvm::TargetMachine::getSymbol(), llvm::TargetLoweringObjectFileELF::getUniqueSectionForFunction(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), and llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal().
|
inlinevirtual |
Get the module-level metadata that the platform cares about.
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileWasm, and llvm::RISCVELFTargetObjectFile.
Definition at line 95 of file TargetLoweringObjectFile.h.
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, and llvm::AArch64_MachoTargetObjectFile.
Definition at line 432 of file TargetLoweringObjectFile.cpp.
References llvm::Mangler::getNameWithPrefix().
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 169 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 245 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::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileXCOFF, llvm::LanaiTargetObjectFile, llvm::MipsTargetObjectFile, llvm::NVPTXTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::SPIRVTargetObjectFile, and llvm::XCoreTargetObjectFile.
Definition at line 374 of file TargetLoweringObjectFile.cpp.
References llvm::MCObjectFileInfo::DataSection, and llvm::MCObjectFileInfo::ReadOnlySection.
Referenced by llvm::AsmPrinter::emitConstantPool(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::TargetLoweringObjectFileCOFF::getSectionForConstant(), and getSectionForJumpTable().
|
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 268 of file TargetLoweringObjectFile.h.
|
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 252 of file TargetLoweringObjectFile.h.
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileCOFF, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 349 of file TargetLoweringObjectFile.cpp.
References F, llvm::SectionKind::getReadOnly(), and getSectionForConstant().
Referenced by llvm::AsmPrinter::emitJumpTableInfo().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileXCOFF, and llvm::TargetLoweringObjectFileGOFF.
Definition at line 135 of file TargetLoweringObjectFile.h.
References llvm::MCObjectFileInfo::LSDASection.
Referenced by llvm::EHStreamer::emitExceptionTable().
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 383 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 260 of file TargetLoweringObjectFile.h.
|
inlinevirtual |
Returns the register used as static base in RWPI variants.
Reimplemented in llvm::ARMElfTargetObjectFile.
Definition at line 226 of file TargetLoweringObjectFile.h.
References llvm::MCRegister::NoRegister.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileWasm, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 177 of file TargetLoweringObjectFile.h.
References StaticCtorSection.
Referenced by llvm::AsmPrinter::emitXXStructorList().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileWasm, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 182 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::TargetMachine::getNameWithPrefix(), llvm::MCContext::getOrCreateSymbol(), llvm::DataLayout::getPrivateGlobalPrefix(), and TM.
Referenced by llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::AsmPrinter::getSymbolWithGlobalValueBase(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), and llvm::SparcELFTargetObjectFile::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 275 of file TargetLoweringObjectFile.h.
Referenced by llvm::TargetMachine::getSymbol().
|
inline |
Definition at line 171 of file TargetLoweringObjectFile.h.
References TTypeEncoding.
Referenced by llvm::EHStreamer::emitExceptionTable().
|
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::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::AArch64_MachoTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::SparcELFTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 397 of file TargetLoweringObjectFile.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCObjectFileInfo::getContext(), llvm::TargetMachine::getSymbol(), getTTypeReference(), llvm::Ref, and TM.
Referenced by llvm::AsmPrinter::emitTTypeReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), and llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference().
const MCExpr * TargetLoweringObjectFile::getTTypeReference | ( | const MCSymbolRefExpr * | Sym, |
unsigned | Encoding, | ||
MCStreamer & | Streamer | ||
) | const |
Definition at line 406 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(), llvm::report_fatal_error(), and Sym.
Referenced by getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), and llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference().
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 389 of file TargetLoweringObjectFile.cpp.
|
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::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileXCOFF, llvm::ARMElfTargetObjectFile, llvm::AVRTargetObjectFile, llvm::CSKYELFTargetObjectFile, llvm::HexagonTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::M68kELFTargetObjectFile, llvm::MipsTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::SPIRVTargetObjectFile, 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::TargetMachine::getCodeModel(), llvm::MCObjectFileInfo::initMCObjectFileInfo(), llvm::TargetMachine::isPositionIndependent(), llvm::CodeModel::Large, LSDAEncoding, PersonalityEncoding, TM, and TTypeEncoding.
Referenced by llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::TargetLoweringObjectFileXCOFF::Initialize(), llvm::SPIRVTargetObjectFile::Initialize(), and llvm::WebAssemblyTargetObjectFile::Initialize().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileELF.
Definition at line 203 of file TargetLoweringObjectFile.h.
Referenced by llvm::AsmPrinter::lowerConstant().
|
inlinevirtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileWasm, and llvm::TargetLoweringObjectFileXCOFF.
Definition at line 191 of file TargetLoweringObjectFile.h.
Referenced by llvm::AsmPrinter::lowerConstant().
|
delete |
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 344 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 320 of file TargetLoweringObjectFile.cpp.
References getExplicitSectionGlobal(), llvm::GlobalObject::hasSection(), SelectSectionForGlobal(), and TM.
Referenced by llvm::AVRAsmPrinter::doFinalization(), llvm::XtensaAsmPrinter::emitConstantPool(), llvm::AsmPrinter::emitGlobalVariable(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetLoweringObjectFileXCOFF::getTargetSymbol(), and SectionForGlobal().
|
protectedpure virtual |
Implemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileWasm, llvm::TargetLoweringObjectFileXCOFF, llvm::TargetLoweringObjectFileGOFF, llvm::AMDGPUTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::AVRTargetObjectFile, DXILTargetObjectFile, llvm::HexagonTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::MipsTargetObjectFile, llvm::NVPTXTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::SPIRVTargetObjectFile, and llvm::XCoreTargetObjectFile.
Referenced by SectionForGlobal().
|
virtual |
Reimplemented in llvm::TargetLoweringObjectFileELF, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileWasm, llvm::TargetLoweringObjectFileXCOFF, and llvm::HexagonTargetObjectFile.
Definition at line 357 of file TargetLoweringObjectFile.cpp.
References F.
Referenced by llvm::AsmPrinter::emitJumpTableInfo(), and llvm::TargetLoweringObjectFileCOFF::shouldPutJumpTableInFunctionSection().
|
inline |
Target supports TLS offset relocation in debug section?
Definition at line 221 of file TargetLoweringObjectFile.h.
References SupportDebugThreadLocalLocation.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute().
|
inline |
Target supports a native lowering of a dso_local_equivalent constant without needing to replace it with equivalent IR.
Definition at line 199 of file TargetLoweringObjectFile.h.
References SupportDSOLocalEquivalentLowering.
Referenced by llvm::TargetLoweringObjectFileELF::lowerDSOLocalEquivalent().
|
inline |
Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
Definition at line 216 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 210 of file TargetLoweringObjectFile.h.
References SupportIndirectSymViaGOTPCRel.
Referenced by emitGlobalConstantImpl().
|
protected |
Definition at line 60 of file TargetLoweringObjectFile.h.
Referenced by getCallSiteEncoding(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), and llvm::TargetLoweringObjectFileXCOFF::Initialize().
|
protected |
Definition at line 58 of file TargetLoweringObjectFile.h.
Referenced by getLSDAEncoding(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileXCOFF::Initialize(), and llvm::CSKYELFTargetObjectFile::Initialize().
|
protected |
PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.
Definition at line 57 of file TargetLoweringObjectFile.h.
Referenced by getPersonalityEncoding(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileXCOFF::Initialize(), and llvm::CSKYELFTargetObjectFile::Initialize().
|
protected |
This section contains the static constructor pointer list.
Definition at line 63 of file TargetLoweringObjectFile.h.
Referenced by getStaticCtorSection(), llvm::TargetLoweringObjectFileCOFF::getStaticCtorSection(), llvm::TargetLoweringObjectFileWasm::getStaticCtorSection(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileCOFF::Initialize(), llvm::TargetLoweringObjectFileELF::InitializeELF(), and llvm::TargetLoweringObjectFileWasm::InitializeWasm().
|
protected |
This section contains the static destructor pointer list.
Definition at line 66 of file TargetLoweringObjectFile.h.
Referenced by getStaticDtorSection(), llvm::TargetLoweringObjectFileMachO::getStaticDtorSection(), llvm::TargetLoweringObjectFileCOFF::getStaticDtorSection(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileCOFF::Initialize(), and llvm::TargetLoweringObjectFileELF::InitializeELF().
Definition at line 52 of file TargetLoweringObjectFile.h.
Referenced by llvm::TargetLoweringObjectFileXCOFF::Initialize(), and supportDebugThreadLocalLocation().
|
protected |
Definition at line 53 of file TargetLoweringObjectFile.h.
Referenced by supportDSOLocalEquivalentLowering(), and llvm::TargetLoweringObjectFileELF::TargetLoweringObjectFileELF().
Definition at line 51 of file TargetLoweringObjectFile.h.
Referenced by llvm::AArch64_MachoTargetObjectFile::AArch64_MachoTargetObjectFile(), and supportGOTPCRelWithOffset().
|
protected |
Definition at line 50 of file TargetLoweringObjectFile.h.
Referenced by llvm::AArch64_ELFTargetObjectFile::AArch64_ELFTargetObjectFile(), llvm::ARMElfTargetObjectFile::ARMElfTargetObjectFile(), llvm::RISCVELFTargetObjectFile::Initialize(), supportIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO(), and llvm::X86_64ELFTargetObjectFile::X86_64ELFTargetObjectFile().
|
protected |
Definition at line 68 of file TargetLoweringObjectFile.h.
Referenced by emitCGProfileMetadata(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::AArch64_ELFTargetObjectFile::getAuthPtrSlotSymbol(), llvm::AArch64_MachoTargetObjectFile::getAuthPtrSlotSymbol(), getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::AArch64_MachoTargetObjectFile::getCFIPersonalitySymbol(), llvm::X86_64MachoTargetObjectFile::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileGOFF::getExplicitSectionGlobal(), llvm::AMDGPUTargetObjectFile::getExplicitSectionGlobal(), llvm::ARMElfTargetObjectFile::getExplicitSectionGlobal(), llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(), getKindForGlobal(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), llvm::TargetLoweringObjectFileXCOFF::getSectionForFunctionDescriptor(), llvm::TargetLoweringObjectFileELF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileXCOFF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileELF::getSectionForLSDA(), llvm::TargetLoweringObjectFileXCOFF::getSectionForLSDA(), llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(), llvm::TargetLoweringObjectFileXCOFF::getSectionForTOCEntry(), getSymbolWithGlobalValueBase(), llvm::TargetLoweringObjectFileXCOFF::getTargetSymbol(), getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getUniqueSectionForFunction(), Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::CSKYELFTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::SPIRVTargetObjectFile::Initialize(), llvm::WebAssemblyTargetObjectFile::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::isGlobalInSmallSection(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::HexagonTargetObjectFile::isSmallDataEnabled(), llvm::TargetLoweringObjectFileELF::lowerDSOLocalEquivalent(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), SectionForGlobal(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileGOFF::SelectSectionForGlobal(), llvm::AMDGPUTargetObjectFile::SelectSectionForGlobal(), llvm::ARMElfTargetObjectFile::SelectSectionForGlobal(), llvm::AVRTargetObjectFile::SelectSectionForGlobal(), llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::LanaiTargetObjectFile::SelectSectionForGlobal(), llvm::RISCVELFTargetObjectFile::SelectSectionForGlobal(), and llvm::XCoreTargetObjectFile::SelectSectionForGlobal().
|
protected |
Definition at line 59 of file TargetLoweringObjectFile.h.
Referenced by getTTypeEncoding(), Initialize(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), llvm::TargetLoweringObjectFileXCOFF::Initialize(), llvm::CSKYELFTargetObjectFile::Initialize(), and llvm::TargetLoweringObjectFileWasm::InitializeWasm().