|
LLVM 22.0.0git
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Additional Inherited Members | |
| 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. | |
| Protected Attributes inherited from llvm::TargetLoweringObjectFile | |
| 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 133 of file TargetLoweringObjectFileImpl.h.
| TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO | ( | ) |
Definition at line 1266 of file TargetLoweringObjectFileImpl.cpp.
References llvm::TargetLoweringObjectFile::SupportIndirectSymViaGOTPCRel.
|
overridedefault |
References llvm::CallingConv::C, DL, llvm::Offset, and llvm::TargetLoweringObjectFile::TM.
|
overridevirtual |
Process linker options metadata and emit platform-specific bits.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1341 of file TargetLoweringObjectFileImpl.cpp.
References llvm::cast(), llvm::MCStreamer::emitLinkerOptions(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by emitModuleMetadata().
|
overridevirtual |
Emit the module flags that specify the garbage collection information.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1304 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCStreamer::addBlankLine(), llvm::TargetLoweringObjectFile::emitCGProfileMetadata(), llvm::MCStreamer::emitInt32(), llvm::MCStreamer::emitLabel(), emitLinkerDirectives(), llvm::StringRef::empty(), llvm::MCObjectFileInfo::getContext(), llvm::SectionKind::getData(), llvm::MCContext::getMachOSection(), GetObjCImageInfo(), llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::report_fatal_error(), llvm::MCStreamer::switchSection(), and llvm::toString().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::X86_64MachoTargetObjectFile.
Definition at line 1524 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), llvm::GlobalValue::hasLocalLinkage(), and llvm::TargetLoweringObjectFile::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.
Definition at line 1362 of file TargetLoweringObjectFileImpl.cpp.
References checkMachOComdat(), llvm::MCObjectFileInfo::getContext(), llvm::MCContext::getMachOSection(), llvm::Value::getName(), llvm::GlobalObject::getSection(), llvm::MCSectionMachO::getStubSize(), llvm::MCSectionMachO::getTypeAndAttributes(), handlePragmaClangSection(), llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::report_fatal_error(), llvm::TargetLoweringObjectFile::TM, and llvm::toString().
|
overridevirtual |
Get MachO PC relative GOT entry relocation.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::X86_64MachoTargetObjectFile.
Definition at line 1544 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCBinaryExpr::createSub(), llvm::MCValue::getConstant(), llvm::MCObjectFileInfo::getContext(), llvm::Module::getDataLayout(), llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfo::getModule(), llvm::MCSymbol::getName(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::DataLayout::getPrivateGlobalPrefix(), llvm::MCValue::getSubSym(), llvm::GlobalValue::hasLocalLinkage(), and llvm::Offset.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1631 of file TargetLoweringObjectFileImpl.cpp.
References canUsePrivateLabel(), llvm::GlobalValue::getAliaseeObject(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::TargetLoweringObjectFile::getMangler(), llvm::Mangler::getNameWithPrefix(), llvm::TargetLoweringObjectFile::SectionForGlobal(), and llvm::TargetLoweringObjectFile::TM.
|
overridevirtual |
If supported, return the section to use for the llvm.commandline metadata.
Otherwise, return nullptr.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1491 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCObjectFileInfo::getContext(), llvm::MCContext::getMachOSection(), and llvm::SectionKind::getReadOnly().
|
overridevirtual |
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 from llvm::TargetLoweringObjectFile.
Definition at line 1474 of file TargetLoweringObjectFileImpl.cpp.
References llvm::CallingConv::C, llvm::MCObjectFileInfo::ConstDataSection, DL, llvm::MCObjectFileInfo::EightByteConstantSection, llvm::MCObjectFileInfo::FourByteConstantSection, llvm::MCObjectFileInfo::ReadOnlySection, and llvm::MCObjectFileInfo::SixteenByteConstantSection.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 1294 of file TargetLoweringObjectFileImpl.cpp.
References llvm::TargetLoweringObjectFile::StaticDtorSection.
|
overridevirtual |
The mach-o version of this method defaults to returning a stub reference.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::X86_64MachoTargetObjectFile.
Definition at line 1496 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::dwarf::DW_EH_PE_indirect, llvm::MCObjectFileInfo::getContext(), llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::GlobalValue::hasLocalLinkage(), and llvm::TargetLoweringObjectFile::TM.
Referenced by llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), and llvm::X86_64MachoTargetObjectFile::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.
Definition at line 1270 of file TargetLoweringObjectFileImpl.cpp.
References llvm::dwarf::DW_EH_PE_indirect, llvm::dwarf::DW_EH_PE_pcrel, llvm::dwarf::DW_EH_PE_sdata4, llvm::SectionKind::getData(), llvm::TargetLoweringObjectFile::Initialize(), llvm::TargetLoweringObjectFile::LSDAEncoding, llvm::TargetLoweringObjectFile::PersonalityEncoding, llvm::MachO::S_MOD_INIT_FUNC_POINTERS, llvm::MachO::S_MOD_TERM_FUNC_POINTERS, llvm::Reloc::Static, llvm::TargetLoweringObjectFile::StaticCtorSection, llvm::TargetLoweringObjectFile::StaticDtorSection, llvm::TargetLoweringObjectFile::TM, and llvm::TargetLoweringObjectFile::TTypeEncoding.
|
overridevirtual |
Implements llvm::TargetLoweringObjectFile.
Definition at line 1404 of file TargetLoweringObjectFileImpl.cpp.
References llvm::cast(), checkMachOComdat(), llvm::MCObjectFileInfo::ConstDataCoalSection, llvm::MCObjectFileInfo::ConstDataSection, llvm::MCObjectFileInfo::ConstTextCoalSection, llvm::MCObjectFileInfo::CStringSection, llvm::MCObjectFileInfo::DataBSSSection, llvm::MCObjectFileInfo::DataCoalSection, llvm::MCObjectFileInfo::DataCommonSection, llvm::MCObjectFileInfo::DataSection, llvm::MCObjectFileInfo::EightByteConstantSection, llvm::MCObjectFileInfo::FourByteConstantSection, llvm::GlobalValue::getDataLayout(), llvm::DataLayout::getPreferredAlign(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasPrivateLinkage(), llvm::GlobalValue::isWeakForLinker(), llvm::MCObjectFileInfo::ReadOnlySection, llvm::MCObjectFileInfo::SixteenByteConstantSection, llvm::MCObjectFileInfo::TextCoalSection, llvm::MCObjectFileInfo::TextSection, llvm::MCObjectFileInfo::TLSBSSSection, llvm::MCObjectFileInfo::TLSDataSection, llvm::TargetLoweringObjectFile::TM, and llvm::MCObjectFileInfo::UStringSection.