LLVM
17.0.0git
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Protected Attributes | |
MCSymbolRefExpr::VariantKind | PLTRelativeVariantKind |
![]() | |
bool | SupportIndirectSymViaGOTPCRel = false |
bool | SupportGOTPCRelWithOffset = true |
bool | SupportDebugThreadLocalLocation = true |
bool | SupportDSOLocalEquivalentLowering = false |
unsigned | PersonalityEncoding = 0 |
PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH. More... | |
unsigned | LSDAEncoding = 0 |
unsigned | TTypeEncoding = 0 |
unsigned | CallSiteEncoding = 0 |
MCSection * | StaticCtorSection = nullptr |
This section contains the static constructor pointer list. More... | |
MCSection * | StaticDtorSection = nullptr |
This section contains the static destructor pointer list. More... | |
const TargetMachine * | TM = nullptr |
![]() | |
bool | SupportsWeakOmittedEHFrame = false |
True if target object file supports a weak_definition of constant 0 for an omitted EH frame. More... | |
bool | SupportsCompactUnwindWithoutEHFrame = false |
True if the target object file supports emitting a compact unwind section without an associated EH frame section. More... | |
bool | OmitDwarfIfHaveCompactUnwind = false |
OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with compact unwind and other with dwarf unwind. More... | |
unsigned | FDECFIEncoding = 0 |
FDE CFI encoding. More... | |
unsigned | CompactUnwindDwarfEHFrameOnly = 0 |
Compact unwind encoding indicating that we should emit only an EH frame. More... | |
MCSection * | TextSection = nullptr |
Section directive for standard text. More... | |
MCSection * | DataSection = nullptr |
Section directive for standard data. More... | |
MCSection * | BSSSection = nullptr |
Section that is default initialized to zero. More... | |
MCSection * | ReadOnlySection = nullptr |
Section that is readonly and can contain arbitrary initialized data. More... | |
MCSection * | LSDASection = nullptr |
If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to. More... | |
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. More... | |
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. More... | |
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. More... | |
MCSection * | DwarfAddrSection = nullptr |
MCSection * | DwarfRnglistsSection = nullptr |
The DWARF v5 range list section. More... | |
MCSection * | DwarfLoclistsSection = nullptr |
The DWARF v5 locations list section. More... | |
MCSection * | DwarfRnglistsDWOSection = nullptr |
The DWARF v5 range and location list sections for fission. More... | |
MCSection * | DwarfLoclistsDWOSection = nullptr |
MCSection * | DwarfCUIndexSection = nullptr |
MCSection * | DwarfTUIndexSection = nullptr |
MCSection * | DwarfGnuPubNamesSection = nullptr |
Section for newer gnu pubnames. More... | |
MCSection * | DwarfGnuPubTypesSection = nullptr |
Section for newer gnu pubtypes. More... | |
MCSection * | DwarfSwiftASTSection = nullptr |
MCSection * | COFFDebugSymbolsSection = nullptr |
MCSection * | COFFDebugTypesSection = nullptr |
MCSection * | COFFGlobalTypeHashesSection = nullptr |
MCSection * | TLSExtraDataSection = nullptr |
Extra TLS Variable Data section. More... | |
MCSection * | TLSDataSection = nullptr |
Section directive for Thread Local data. ELF, MachO, COFF, and Wasm. More... | |
MCSection * | TLSBSSSection = nullptr |
Section directive for Thread Local uninitialized data. More... | |
MCSection * | StackMapSection = nullptr |
StackMap section. More... | |
MCSection * | FaultMapSection = nullptr |
FaultMap section. More... | |
MCSection * | RemarksSection = nullptr |
Remarks section. More... | |
MCSection * | EHFrameSection = nullptr |
EH frame section. More... | |
MCSection * | StackSizesSection = nullptr |
Section containing metadata on function stack sizes. More... | |
MCSection * | PseudoProbeSection = nullptr |
Section for pseudo probe information used by AutoFDO. More... | |
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. More... | |
const MCSection * | TLSThreadInitSection = nullptr |
Section for thread local data initialization functions. More... | |
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. More... | |
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 * | TOCBaseSection = nullptr |
MCSection * | ReadOnly8Section = nullptr |
MCSection * | ReadOnly16Section = nullptr |
std::array< MCSection *, binaryformat::Swift5ReflectionSectionKind::last > | Swift5ReflectionSections = {} |
Additional Inherited Members | |
![]() | |
static SectionKind | getKindForGlobal (const GlobalObject *GO, const TargetMachine &TM) |
Classify the specified global variable into a set of target independent categories embodied in SectionKind. More... | |
Definition at line 34 of file TargetLoweringObjectFileImpl.h.
TargetLoweringObjectFileELF::TargetLoweringObjectFileELF | ( | ) |
Definition at line 112 of file TargetLoweringObjectFileImpl.cpp.
|
overridedefault |
|
overridevirtual |
Emit Obj-C garbage collection and linker options.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 314 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCStreamer::addBlankLine(), assert(), llvm::MCStreamer::emitBytes(), llvm::MCStreamer::emitInt32(), llvm::MCStreamer::emitInt64(), llvm::MCStreamer::emitInt8(), llvm::MCStreamer::emitLabel(), llvm::MCStreamer::emitULEB128IntValue(), llvm::encodeBase64(), GetObjCImageInfo(), I, M, llvm::PseudoProbeDescMetadataName, llvm::report_fatal_error(), S, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_EXCLUDE, llvm::ELF::SHF_MERGE, llvm::ELF::SHF_STRINGS, llvm::ELF::SHT_LLVM_DEPENDENT_LIBRARIES, llvm::ELF::SHT_LLVM_LINKER_OPTIONS, llvm::ELF::SHT_PROGBITS, llvm::Twine::str(), llvm::MCStreamer::switchSection(), TM, and llvm::IndexedInstrProf::Version.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 424 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCConstantExpr::create(), DL, E, llvm::MCStreamer::emitELFSize(), llvm::MCStreamer::emitLabel(), llvm::MCStreamer::emitSymbolAttribute(), llvm::MCStreamer::emitSymbolValue(), llvm::MCStreamer::emitValueToAlignment(), llvm::MCSymbol::getName(), llvm::MCSA_ELF_TypeObject, llvm::MCSA_Hidden, llvm::MCSA_Weak, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_PROGBITS, and llvm::MCStreamer::switchSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 412 of file TargetLoweringObjectFileImpl.cpp.
References llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_indirect, llvm::report_fatal_error(), and TM.
|
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.
Reimplemented in llvm::ARMElfTargetObjectFile, llvm::XCoreTargetObjectFile, llvm::AMDGPUTargetObjectFile, and llvm::HexagonTargetObjectFile.
Definition at line 844 of file TargetLoweringObjectFileImpl.cpp.
References selectExplicitSectionGlobal(), and TM.
Referenced by llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::AMDGPUTargetObjectFile::getExplicitSectionGlobal(), and llvm::ARMElfTargetObjectFile::getExplicitSectionGlobal().
|
overridevirtual |
Get the module-level metadata that the platform cares about.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::RISCVELFTargetObjectFile.
Definition at line 306 of file TargetLoweringObjectFileImpl.cpp.
References llvm::collectUsedGlobalVariables(), and M.
Referenced by llvm::RISCVELFTargetObjectFile::getModuleMetadata().
|
overridevirtual |
If supported, return the section to use for the llvm.commandline metadata.
Otherwise, return nullptr.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1152 of file TargetLoweringObjectFileImpl.cpp.
References llvm::ELF::SHF_MERGE, llvm::ELF::SHF_STRINGS, and llvm::ELF::SHT_PROGBITS.
|
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.
Reimplemented in llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::RISCVELFTargetObjectFile, and llvm::XCoreTargetObjectFile.
Definition at line 1009 of file TargetLoweringObjectFileImpl.cpp.
References assert().
Referenced by llvm::RISCVELFTargetObjectFile::getSectionForConstant(), llvm::LanaiTargetObjectFile::getSectionForConstant(), and llvm::MipsTargetObjectFile::getSectionForConstant().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 950 of file TargetLoweringObjectFileImpl.cpp.
References F, llvm::SectionKind::getReadOnly(), selectELFSectionForGlobal(), llvm::ELF::SHF_ALLOC, and TM.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 965 of file TargetLoweringObjectFileImpl.cpp.
References llvm::Comdat::Any, F, getELFComdat(), llvm::MCSection::NonUniqueID, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_LINK_ORDER, and TM.
|
overridevirtual |
Returns a unique section for the given machine basic block.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1028 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::BBSectionsColdTextPrefix, llvm::MBBSectionID::ColdSectionID, llvm::MBBSectionID::ExceptionSectionID, F, llvm::MCContext::GenericSectionID, llvm::MCSection::getName(), llvm::MCSymbol::getName(), llvm::MachineFunction::getName(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSection(), llvm::MachineBasicBlock::getSectionID(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineBasicBlock::isBeginSection(), MBB, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_EXECINSTR, llvm::ELF::SHF_GROUP, llvm::ELF::SHT_PROGBITS, and TM.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1106 of file TargetLoweringObjectFileImpl.cpp.
References getStaticStructorSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1112 of file TargetLoweringObjectFileImpl.cpp.
References getStaticStructorSection().
|
overridevirtual |
Return an MCExpr to use for a reference to the specified type info global variable from exception handling information.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::ARMElfTargetObjectFile, and llvm::SparcELFTargetObjectFile.
Definition at line 446 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::dwarf::DW_EH_PE_indirect, llvm::MachineModuleInfoELF::getGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::GlobalValue::hasLocalLinkage(), and TM.
Referenced by llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), and llvm::ARMElfTargetObjectFile::getTTypeGlobalReference().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 934 of file TargetLoweringObjectFileImpl.cpp.
References F, getELFSectionFlags(), llvm::SectionKind::getText(), selectELFSectionForGlobal(), selectExplicitSectionGlobal(), and 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.
Reimplemented in llvm::M68kELFTargetObjectFile, llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::XCoreTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::AVRTargetObjectFile, llvm::HexagonTargetObjectFile, and llvm::CSKYELFTargetObjectFile.
Definition at line 116 of file TargetLoweringObjectFileImpl.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::aarch64_be, llvm::ARM, llvm::Triple::arm, llvm::Triple::armeb, llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_indirect, llvm::dwarf::DW_EH_PE_pcrel, llvm::dwarf::DW_EH_PE_sdata4, llvm::dwarf::DW_EH_PE_sdata8, llvm::dwarf::DW_EH_PE_udata4, llvm::dwarf::DW_EH_PE_udata8, llvm::Triple::getArch(), llvm::MCContext::getAsmInfo(), llvm::TargetMachine::getCodeModel(), llvm::Triple::getEnvironment(), llvm::MCAsmInfo::getExceptionHandlingType(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::GNUILP32, llvm::Triple::hexagon, llvm::TargetLoweringObjectFile::Initialize(), llvm::Triple::isOSFreeBSD(), llvm::Triple::lanai, llvm::Triple::loongarch32, llvm::Triple::loongarch64, llvm::CodeModel::Medium, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::TargetMachine::Options, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::Triple::ppcle, llvm::Triple::riscv32, llvm::Triple::riscv64, llvm::CodeModel::Small, llvm::Triple::sparc, llvm::Triple::sparcel, llvm::Triple::sparcv9, llvm::Triple::systemz, llvm::Triple::thumb, llvm::Triple::thumbeb, llvm::TargetOptions::UseInitArray, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::CSKYELFTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), and llvm::M68kELFTargetObjectFile::Initialize().
void TargetLoweringObjectFileELF::InitializeELF | ( | bool | UseInitArray_ | ) |
Definition at line 1161 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCContext::getELFSection(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_FINI_ARRAY, llvm::ELF::SHT_INIT_ARRAY, and llvm::ELF::SHT_PROGBITS.
Referenced by llvm::M68kELFTargetObjectFile::Initialize().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1138 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::MCSymbolRefExpr::create(), llvm::DSOLocalEquivalent::getGlobalValue(), and TM.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1118 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::Type::getPointerAddressSpace(), llvm::Value::getType(), LHS, RHS, and TM.
|
overridevirtual |
Implements llvm::TargetLoweringObjectFile.
Reimplemented in llvm::ARMElfTargetObjectFile, llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::XCoreTargetObjectFile, llvm::AMDGPUTargetObjectFile, llvm::AVRTargetObjectFile, and llvm::HexagonTargetObjectFile.
Definition at line 915 of file TargetLoweringObjectFileImpl.cpp.
References getELFSectionFlags(), llvm::GlobalObject::hasComdat(), selectELFSectionForGlobal(), llvm::ELF::SHF_MERGE, and TM.
Referenced by llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::AVRTargetObjectFile::SelectSectionForGlobal(), llvm::AMDGPUTargetObjectFile::SelectSectionForGlobal(), llvm::RISCVELFTargetObjectFile::SelectSectionForGlobal(), llvm::LanaiTargetObjectFile::SelectSectionForGlobal(), llvm::MipsTargetObjectFile::SelectSectionForGlobal(), and llvm::ARMElfTargetObjectFile::SelectSectionForGlobal().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::HexagonTargetObjectFile.
Definition at line 1000 of file TargetLoweringObjectFileImpl.cpp.
|
protected |
Definition at line 40 of file TargetLoweringObjectFileImpl.h.
Referenced by llvm::AArch64_ELFTargetObjectFile::AArch64_ELFTargetObjectFile(), llvm::ARMElfTargetObjectFile::ARMElfTargetObjectFile(), and llvm::X86ELFTargetObjectFile::X86ELFTargetObjectFile().