|
LLVM
10.0.0
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Protected Attributes | |
| MCSymbolRefExpr::VariantKind | PLTRelativeVariantKind |
| const TargetMachine * | TM = nullptr |
Protected Attributes inherited from llvm::TargetLoweringObjectFile | |
| bool | SupportIndirectSymViaGOTPCRel = false |
| bool | SupportGOTPCRelWithOffset = true |
| bool | SupportDebugThreadLocalLocation = true |
| 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... | |
Protected Attributes inherited from llvm::MCObjectFileInfo | |
| bool | CommDirectiveSupportsAlignment = false |
| True if .comm supports alignment. More... | |
| 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 * | 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 * | 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... | |
| DenseMap< const MCSymbol *, unsigned > | StackSizesUniquing |
| 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 * | DrectveSection = nullptr |
| COFF specific sections. More... | |
| MCSection * | PDataSection = nullptr |
| MCSection * | XDataSection = nullptr |
| MCSection * | SXDataSection = nullptr |
| MCSection * | GFIDsSection = nullptr |
| MCSection * | GLJMPSection = nullptr |
Additional Inherited Members | |
Public Types inherited from llvm::MCObjectFileInfo | |
| enum | Environment { IsMachO, IsELF, IsCOFF, IsWasm, IsXCOFF } |
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. More... | |
Definition at line 32 of file TargetLoweringObjectFileImpl.h.
|
default |
|
overridedefault |
|
overridevirtual |
Emit Obj-C garbage collection and linker options.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 266 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCStreamer::AddBlankLine(), C, llvm::MCSymbolRefExpr::create(), E, llvm::MCStreamer::EmitBytes(), llvm::MCStreamer::emitCGProfileEntry(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitLabel(), llvm::StringRef::empty(), F(), From, llvm::Module::getModuleFlagsMetadata(), llvm::Module::getNamedMetadata(), GetObjCImageInfo(), llvm::MDNode::getOperand(), llvm::MDNode::operands(), llvm::report_fatal_error(), llvm::ARMBuildAttrs::Section, 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::MCStreamer::SwitchSection(), llvm::SystemZISD::TM, llvm::IndexedInstrProf::Version, and llvm::MCSymbolRefExpr::VK_None.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 367 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCConstantExpr::create(), E, llvm::MCStreamer::emitELFSize(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitSymbolAttribute(), llvm::MCStreamer::EmitSymbolValue(), llvm::MCStreamer::EmitValueToAlignment(), llvm::MCSymbol::getName(), llvm::DataLayout::getPointerABIAlignment(), llvm::DataLayout::getPointerSize(), 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, Size, llvm::MCStreamer::SwitchSection(), and llvm::Align::value().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 355 of file TargetLoweringObjectFileImpl.cpp.
References llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_indirect, llvm::MCSymbol::getName(), llvm::TargetMachine::getSymbol(), and llvm::report_fatal_error().
|
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::AMDGPUTargetObjectFile, llvm::XCoreTargetObjectFile, and llvm::HexagonTargetObjectFile.
Definition at line 557 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, C, llvm::dyn_cast(), F(), llvm::MCContext::GenericSectionID, llvm::MCSectionELF::getAssociatedSymbol(), getAssociatedSymbol(), llvm::GlobalVariable::getAttributes(), getELFComdat(), getELFKindForNamedSection(), getELFSectionFlags(), getELFSectionType(), getEntrySizeForKind(), llvm::Function::getFnAttribute(), llvm::Value::getName(), llvm::GlobalObject::getSection(), llvm::Attribute::getValueAsString(), llvm::Function::hasFnAttribute(), llvm::GlobalVariable::hasImplicitSection(), llvm::SectionKind::isBSS(), llvm::SectionKind::isData(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isReadOnlyWithRel(), llvm::ARMBuildAttrs::Section, llvm::ELF::SHF_GROUP, and llvm::ELF::SHF_LINK_ORDER.
Referenced by llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::AMDGPUTargetObjectFile::getExplicitSectionGlobal(), and llvm::ARMElfTargetObjectFile::getExplicitSectionGlobal().
|
overridevirtual |
If supported, return the section to use for the llvm.commandline metadata.
Otherwise, return nullptr.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 824 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 736 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst32(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnly(), and llvm::SectionKind::isReadOnlyWithRel().
Referenced by llvm::RISCVELFTargetObjectFile::getSectionForConstant(), llvm::LanaiTargetObjectFile::getSectionForConstant(), and llvm::MipsTargetObjectFile::getSectionForConstant().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 712 of file TargetLoweringObjectFileImpl.cpp.
References C, llvm::GlobalObject::getComdat(), llvm::TargetMachine::getFunctionSections(), llvm::SectionKind::getReadOnly(), selectELFSectionForGlobal(), and llvm::ELF::SHF_ALLOC.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 792 of file TargetLoweringObjectFileImpl.cpp.
References getStaticStructorSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 798 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::SparcELFTargetObjectFile, and llvm::ARMElfTargetObjectFile.
Definition at line 389 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::TargetMachine::getSymbol(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), and llvm::GlobalValue::hasLocalLinkage().
Referenced by llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), and llvm::SparcELFTargetObjectFile::getTTypeGlobalReference().
|
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::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::XCoreTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::RISCVELFTargetObjectFile, llvm::AVRTargetObjectFile, and llvm::HexagonTargetObjectFile.
Definition at line 94 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::MCAsmInfo::getExceptionHandlingType(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::hexagon, llvm::TargetLoweringObjectFile::Initialize(), llvm::Triple::isOSFreeBSD(), llvm::Triple::lanai, LLVM_FALLTHROUGH, llvm::CodeModel::Medium, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, 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::SystemZISD::TM, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::X86ELFTargetObjectFile::getDebugThreadLocalSymbol(), llvm::HexagonTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), and llvm::MipsTargetObjectFile::Initialize().
| void TargetLoweringObjectFileELF::InitializeELF | ( | bool | UseInitArray_ | ) |
Definition at line 833 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::HexagonTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), and llvm::MipsTargetObjectFile::Initialize().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 804 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), llvm::Type::getPointerAddressSpace(), llvm::TargetMachine::getSymbol(), llvm::GlobalValue::getType(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::hasGlobalUnnamedAddr(), llvm::Type::isFunctionTy(), and llvm::GlobalValue::isThreadLocal().
|
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 684 of file TargetLoweringObjectFileImpl.cpp.
References assert(), llvm::MCSectionELF::getAssociatedSymbol(), getAssociatedSymbol(), llvm::TargetMachine::getDataSections(), getELFSectionFlags(), llvm::TargetMachine::getFunctionSections(), llvm::GlobalObject::hasComdat(), llvm::SectionKind::isCommon(), llvm::SectionKind::isText(), llvm::ARMBuildAttrs::Section, selectELFSectionForGlobal(), llvm::ELF::SHF_LINK_ORDER, and llvm::ELF::SHF_MERGE.
Referenced by llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::AVRTargetObjectFile::SelectSectionForGlobal(), llvm::AMDGPUTargetObjectFile::SelectSectionForGlobal(), llvm::RISCVELFTargetObjectFile::SelectSectionForGlobal(), llvm::LanaiTargetObjectFile::SelectSectionForGlobal(), llvm::MipsTargetObjectFile::SelectSectionForGlobal(), llvm::ARMElfTargetObjectFile::SelectSectionForGlobal(), and llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::HexagonTargetObjectFile.
Definition at line 727 of file TargetLoweringObjectFileImpl.cpp.
|
protected |
Definition at line 37 of file TargetLoweringObjectFileImpl.h.
Referenced by llvm::ARMElfTargetObjectFile::ARMElfTargetObjectFile().
|
protected |
Definition at line 39 of file TargetLoweringObjectFileImpl.h.
Referenced by llvm::ARMElfTargetObjectFile::ARMElfTargetObjectFile(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection(), and llvm::SparcELFTargetObjectFile::SparcELFTargetObjectFile().
1.8.13