LLVM 20.0.0git
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Static Public Member Functions | |
static bool | ShouldEmitEHBlock (const MachineFunction *MF) |
static bool | ShouldSetSSPCanaryBitInTB (const MachineFunction *MF) |
static MCSymbol * | getEHInfoTableSymbol (const MachineFunction *MF) |
static XCOFF::StorageClass | getStorageClassForGlobal (const GlobalValue *GV) |
Static Public Member Functions inherited from llvm::TargetLoweringObjectFile | |
static SectionKind | getKindForGlobal (const GlobalObject *GO, const TargetMachine &TM) |
Classify the specified global variable into a set of target independent categories embodied in SectionKind. | |
Additional Inherited Members | |
virtual MCSection * | SelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0 |
Protected Attributes inherited from llvm::TargetLoweringObjectFile | |
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 238 of file TargetLoweringObjectFileImpl.h.
|
default |
|
overridedefault |
|
static |
Definition at line 2325 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MachineFunction::getContext(), llvm::MachineFunction::getFunctionNumber(), and llvm::MCContext::getOrCreateSymbol().
|
overridevirtual |
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.
Implements llvm::TargetLoweringObjectFile.
Definition at line 2369 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCObjectFileInfo::getContext(), llvm::GlobalObject::getSection(), llvm::MCContext::getXCOFFSection(), llvm::GlobalObject::hasSection(), llvm::TargetMachine::Options, llvm::report_fatal_error(), llvm::TargetLoweringObjectFile::TM, llvm::TargetOptions::XCOFFReadOnlyPointers, llvm::XCOFF::XMC_PR, llvm::XCOFF::XMC_RO, llvm::XCOFF::XMC_RW, llvm::XCOFF::XMC_TD, and llvm::XCOFF::XTY_SD.
|
overridevirtual |
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 from llvm::TargetLoweringObjectFile.
Definition at line 2629 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::MCObjectFileInfo::getContext(), llvm::TargetMachine::getFunctionSections(), llvm::TargetLoweringObjectFile::getNameWithPrefix(), llvm::MCContext::getOrCreateSymbol(), llvm::MCSectionXCOFF::getQualNameSymbol(), llvm::SectionKind::getText(), llvm::MCContext::getXCOFFSection(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::TargetLoweringObjectFile::TM, llvm::XCOFF::XMC_PR, llvm::XCOFF::XTY_ER, and llvm::XCOFF::XTY_SD.
Referenced by SelectSectionForGlobal().
|
overridevirtual |
Given a constant with the SectionKind, return a section that it should be placed in.
Given a mergeable constant with the specified size and relocation information, return a section that it should be placed in.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2548 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::MCObjectFileInfo::ReadOnly16Section, llvm::MCObjectFileInfo::ReadOnly8Section, llvm::MCObjectFileInfo::ReadOnlySection, and llvm::report_fatal_error().
|
overridevirtual |
For external functions, this will always return a function descriptor csect.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2402 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::MCObjectFileInfo::getContext(), llvm::SectionKind::getData(), llvm::SectionKind::getMetadata(), llvm::Value::getName(), llvm::TargetLoweringObjectFile::getNameWithPrefix(), llvm::GlobalValue::getThreadLocalMode(), llvm::MCContext::getXCOFFSection(), llvm::Value::hasName(), llvm::GlobalValue::isDeclarationForLinker(), llvm::GlobalValue::isThreadLocal(), llvm::GlobalValue::LocalDynamicTLSModel, Name, llvm::TargetLoweringObjectFile::TM, llvm::XCOFF::XMC_DS, llvm::XCOFF::XMC_TC, llvm::XCOFF::XMC_TD, llvm::XCOFF::XMC_UA, llvm::XCOFF::XMC_UL, llvm::XCOFF::XTY_ER, and llvm::XCOFF::XTY_SD.
Referenced by getTargetSymbol().
|
overridevirtual |
On targets that use separate function descriptor symbols, return a section for the descriptor given its symbol.
Use only with defined functions.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2661 of file TargetLoweringObjectFileImpl.cpp.
References F, llvm::MCObjectFileInfo::getContext(), llvm::SectionKind::getData(), llvm::TargetLoweringObjectFile::getNameWithPrefix(), llvm::MCContext::getXCOFFSection(), llvm::TargetLoweringObjectFile::TM, llvm::XCOFF::XMC_DS, and llvm::XCOFF::XTY_SD.
Referenced by getTargetSymbol().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2525 of file TargetLoweringObjectFileImpl.cpp.
References assert(), F, llvm::MCObjectFileInfo::getContext(), llvm::TargetMachine::getFunctionSections(), llvm::TargetLoweringObjectFile::getNameWithPrefix(), llvm::SectionKind::getReadOnly(), llvm::MCContext::getXCOFFSection(), llvm::MCObjectFileInfo::ReadOnlySection, llvm::TargetLoweringObjectFile::TM, llvm::XCOFF::XMC_RO, and llvm::XCOFF::XTY_SD.
|
overridevirtual |
For functions, this will return the LSDA section.
If option -ffunction-sections is on, this will return a unique csect with the function name appended to .gcc_except_table as a suffix of the LSDA section name.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2702 of file TargetLoweringObjectFileImpl.cpp.
References F, llvm::MCObjectFileInfo::getContext(), llvm::TargetMachine::getFunctionSections(), llvm::MCContext::getXCOFFSection(), llvm::MCObjectFileInfo::LSDASection, and llvm::TargetLoweringObjectFile::TM.
|
overridevirtual |
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 from llvm::TargetLoweringObjectFile.
Definition at line 2670 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolXCOFF::CM_Large, llvm::TargetMachine::getCodeModel(), llvm::MCObjectFileInfo::getContext(), llvm::SectionKind::getData(), llvm::MCSymbolXCOFF::getPerSymbolCodeModel(), llvm::MCSymbolXCOFF::getSymbolTableName(), llvm::MCContext::getXCOFFSection(), llvm::MCSymbolXCOFF::hasPerSymbolCodeModel(), llvm::MCSymbolXCOFF::isEHInfo(), llvm::CodeModel::Large, Sym, llvm::TargetLoweringObjectFile::TM, llvm::XCOFF::XMC_TC, llvm::XCOFF::XMC_TE, and llvm::XCOFF::XTY_SD.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2587 of file TargetLoweringObjectFileImpl.cpp.
References llvm::report_fatal_error().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2592 of file TargetLoweringObjectFileImpl.cpp.
References llvm::report_fatal_error().
|
static |
Definition at line 2605 of file TargetLoweringObjectFileImpl.cpp.
References llvm::GlobalValue::AppendingLinkage, assert(), llvm::GlobalValue::AvailableExternallyLinkage, llvm::XCOFF::C_EXT, llvm::XCOFF::C_HIDEXT, llvm::XCOFF::C_WEAKEXT, llvm::GlobalValue::CommonLinkage, llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::GlobalValue::getLinkage(), llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm_unreachable, llvm::GlobalValue::PrivateLinkage, llvm::report_fatal_error(), llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
|
overridevirtual |
For functions, this will always return a function descriptor symbol.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2333 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SectionKind::getData(), llvm::TargetMachine::getDataSections(), llvm::TargetLoweringObjectFile::getKindForGlobal(), getSectionForExternalReference(), getSectionForFunctionDescriptor(), llvm::SectionKind::isBSSLocal(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadBSSLocal(), llvm::TargetLoweringObjectFile::SectionForGlobal(), and llvm::TargetLoweringObjectFile::TM.
|
overridevirtual |
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 from llvm::TargetLoweringObjectFile.
Definition at line 2568 of file TargetLoweringObjectFileImpl.cpp.
References llvm::TargetLoweringObjectFile::CallSiteEncoding, llvm::dwarf::DW_EH_PE_datarel, llvm::dwarf::DW_EH_PE_indirect, llvm::dwarf::DW_EH_PE_sdata4, llvm::dwarf::DW_EH_PE_sdata8, llvm::dwarf::DW_EH_PE_udata4, llvm::TargetMachine::getTargetTriple(), llvm::TargetLoweringObjectFile::Initialize(), llvm::Triple::isArch32Bit(), llvm::TargetLoweringObjectFile::LSDAEncoding, llvm::TargetLoweringObjectFile::PersonalityEncoding, llvm::TargetLoweringObjectFile::SupportDebugThreadLocalLocation, and llvm::TargetLoweringObjectFile::TTypeEncoding.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2597 of file TargetLoweringObjectFileImpl.cpp.
|
overridevirtual |
Implements llvm::TargetLoweringObjectFile.
Definition at line 2434 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCObjectFileInfo::DataSection, llvm::MCObjectFileInfo::getContext(), llvm::SectionKind::getData(), llvm::TargetMachine::getDataSections(), getFunctionEntryPointSymbol(), llvm::TargetMachine::getFunctionSections(), llvm::TargetLoweringObjectFile::getNameWithPrefix(), llvm::SectionKind::getReadOnly(), llvm::MCContext::getXCOFFSection(), llvm::GlobalValue::hasCommonLinkage(), Name, llvm::TargetMachine::Options, llvm::MCObjectFileInfo::ReadOnlySection, llvm::report_fatal_error(), llvm::MCObjectFileInfo::TextSection, llvm::MCObjectFileInfo::TLSDataSection, llvm::TargetLoweringObjectFile::TM, llvm::TargetOptions::XCOFFReadOnlyPointers, llvm::XCOFF::XMC_BS, llvm::XCOFF::XMC_RO, llvm::XCOFF::XMC_RW, llvm::XCOFF::XMC_TD, llvm::XCOFF::XMC_TL, llvm::XCOFF::XMC_UL, llvm::XCOFF::XTY_CM, and llvm::XCOFF::XTY_SD.
|
static |
Definition at line 2295 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::classifyEHPersonality(), F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getLandingPads(), and llvm::isNoOpWithoutInvoke().
Referenced by llvm::AIXException::endFunction().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 2541 of file TargetLoweringObjectFileImpl.cpp.
|
static |
Definition at line 2313 of file TargetLoweringObjectFileImpl.cpp.
References F, and llvm::MachineFunction::getFunction().