LLVM: llvm::LanaiTargetObjectFile Class Reference (original) (raw)
Public Member Functions
void
Initialize (MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
isGlobalInSmallSection (const GlobalObject *GO, const TargetMachine &TM) const
Return true if this global address should be placed into small data/bss section.
SelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
isConstantInSmallSection (const DataLayout &DL, const Constant *CN) const
Return true if this constant should be placed into small data section.
getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
Public Member Functions inherited from llvm::TargetLoweringObjectFileELF
~TargetLoweringObjectFileELF () override=default
void
Initialize (MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
void
getModuleMetadata (Module &M) override
Get the module-level metadata that the platform cares about.
void
emitModuleMetadata (MCStreamer &Streamer, Module &M) const override
Emit Obj-C garbage collection and linker options.
void
emitPersonalityValue (MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym, const MachineModuleInfo *MMI) const override
virtual void
emitPersonalityValueImpl (MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym, const MachineModuleInfo *MMI) const
void
emitLinkerDirectives (MCStreamer &Streamer, Module &M) const override
Process linker options metadata and emit platform-specific bits.
getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment, StringRef SectionSuffix) const override
Similar to the function above, but append SectionSuffix to the section name.
getExplicitSectionGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Targets should implement this method to assign a section to globals with an explicit section specfied.
SelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
getSectionForJumpTable (const Function &F, const TargetMachine &TM) const override
getSectionForJumpTable (const Function &F, const TargetMachine &TM, const MachineJumpTableEntry *JTE) const override
getSectionForLSDA (const Function &F, const MCSymbol &FnSym, const TargetMachine &TM) const override
getSectionForMachineBasicBlock (const Function &F, const MachineBasicBlock &MBB, const TargetMachine &TM) const override
Returns a unique section for the given machine basic block.
getUniqueSectionForFunction (const Function &F, const TargetMachine &TM) const override
shouldPutJumpTableInFunctionSection (bool UsesLabelDifference, const Function &F) const override
getTTypeGlobalReference (const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
Return an MCExpr to use for a reference to the specified type info global variable from exception handling information.
MCSymbol *
getCFIPersonalitySymbol (const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
void
InitializeELF (bool UseInitArray_)
getStaticCtorSection (unsigned Priority, const MCSymbol *KeySym) const override
getStaticDtorSection (unsigned Priority, const MCSymbol *KeySym) const override
lowerSymbolDifference (const MCSymbol *LHS, const MCSymbol *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset) const
lowerDSOLocalEquivalent (const MCSymbol *LHS, const MCSymbol *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const override
getSectionForCommandLines () const override
If supported, return the section to use for the llvm.commandline metadata.
Public Member Functions inherited from llvm::TargetLoweringObjectFile
TargetLoweringObjectFile ()=default
TargetLoweringObjectFile (const TargetLoweringObjectFile &)=delete
operator= (const TargetLoweringObjectFile &)=delete
~TargetLoweringObjectFile () override
Mangler &
getMangler () const
void
emitCGProfileMetadata (MCStreamer &Streamer, Module &M) const
Emit Call Graph Profile metadata.
void
emitPseudoProbeDescMetadata (MCStreamer &Streamer, Module &M, std::function< void(MCStreamer &Streamer)> COMDATSymEmitter=nullptr) const
Emit pseudo_probe_desc metadata.
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.
SectionForGlobal (const GlobalObject *GO, const TargetMachine &TM) const
This method computes the appropriate section to emit the specified global variable or function definition.
virtual void
getNameWithPrefix (SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const
MCSymbol *
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.
getPersonalityEncoding () const
getTTypeReference (const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
getDebugThreadLocalSymbol (const MCSymbol *Sym) const
Create a symbol reference to describe the given TLS variable when emitting the address in debug info.
lowerRelativeReference (const GlobalValue *LHS, const GlobalValue *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
Target supports a PC-relative relocation that references the PLT of a function.
supportIndirectSymViaGOTPCRel () const
Target supports replacing a data "PC"-relative access to a symbol through another symbol, by accessing the later via a GOT entry instead?
supportGOTPCRelWithOffset () const
Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
supportDebugThreadLocalLocation () const
Target supports TLS offset relocation in debug section?
virtual MCRegister
Returns the register used as static base in RWPI variants.
getIndirectSymViaRWPI (const MCSymbol *Sym) const
Get the target specific RWPI relocation.
getIndirectSymViaGOTPCRel (const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const
Get the target specific PC relative GOT entry relocation.
virtual MCSection *
getSectionForFunctionDescriptor (const Function *F, const TargetMachine &TM) const
On targets that use separate function descriptor symbols, return a section for the descriptor given its symbol.
virtual MCSection *
getSectionForTOCEntry (const MCSymbol *S, const TargetMachine &TM) const
On targets that support TOC entries, return a section for the entry given the symbol it refers to.
virtual MCSection *
getSectionForExternalReference (const GlobalObject *GO, const TargetMachine &TM) const
On targets that associate external references with a section, return such a section for the given external global.
virtual MCSymbol *
getTargetSymbol (const GlobalValue *GV, const TargetMachine &TM) const
Targets that have a special convention for their symbols could use this hook to return a specialized symbol.
virtual MCSymbol *
getFunctionEntryPointSymbol (const GlobalValue *Func, const TargetMachine &TM) const
If supported, return the function entry point symbol.
Public Member Functions inherited from llvm::MCObjectFileInfo
void
initMCObjectFileInfo (MCContext &MCCtx, bool PIC, bool LargeCodeModel=false)
virtual
getContext () const
getSupportsCompactUnwindWithoutEHFrame () const
getOmitDwarfIfHaveCompactUnwind () const
getCompactUnwindDwarfEHFrameOnly () const
std::optional< sframe::ABI >
virtual unsigned
getTextSectionAlignment () const
getCompactUnwindSection () const
getDwarfAbbrevSection () const
getDwarfInfoSection (uint64_t Hash) const
getDwarfLineStrSection () const
getDwarfPubNamesSection () const
getDwarfPubTypesSection () const
getDwarfGnuPubNamesSection () const
getDwarfGnuPubTypesSection () const
getDwarfDebugInlineSection () const
getDwarfARangesSection () const
getDwarfRangesSection () const
getDwarfRnglistsSection () const
getDwarfLoclistsSection () const
getDwarfMacinfoSection () const
getDwarfDebugNamesSection () const
getDwarfAccelNamesSection () const
getDwarfAccelObjCSection () const
getDwarfAccelNamespaceSection () const
getDwarfAccelTypesSection () const
getDwarfInfoDWOSection () const
getDwarfTypesSection (uint64_t Hash) const
getDwarfTypesDWOSection () const
getDwarfAbbrevDWOSection () const
getDwarfStrDWOSection () const
getDwarfLineDWOSection () const
getDwarfLocDWOSection () const
getDwarfStrOffDWOSection () const
getDwarfStrOffSection () const
getDwarfRnglistsDWOSection () const
getDwarfLoclistsDWOSection () const
getDwarfMacroDWOSection () const
getDwarfMacinfoDWOSection () const
getDwarfCUIndexSection () const
getDwarfTUIndexSection () const
getDwarfSwiftASTSection () const
getCOFFDebugSymbolsSection () const
getCOFFDebugTypesSection () const
getCOFFGlobalTypeHashesSection () const
getTLSExtraDataSection () const
getCallGraphSection (const MCSection &TextSec) const
getStackSizesSection (const MCSection &TextSec) const
getBBAddrMapSection (const MCSection &TextSec) const
getKCFITrapSection (const MCSection &TextSec) const
getPseudoProbeSection (const MCSection &TextSec) const
getPseudoProbeDescSection (StringRef FuncName) const
getPCSection (StringRef Name, const MCSection *TextSec) const
getMergeableConst4Section () const
getMergeableConst8Section () const
getMergeableConst16Section () const
getMergeableConst32Section () const
getTLSThreadInitSection () const
getConstTextCoalSection () const
getConstDataCoalSection () const
getFourByteConstantSection () const
getEightByteConstantSection () const
getSixteenByteConstantSection () const
getLazySymbolPointerSection () const
getNonLazySymbolPointerSection () const
getThreadLocalPointerSection () const
isPositionIndependent () const
getSwift5ReflectionSection (llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind)
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::TargetLoweringObjectFileELF
Protected Attributes inherited from llvm::TargetLoweringObjectFile
SupportIndirectSymViaGOTPCRel = false
SupportGOTPCRelWithOffset = true
SupportDebugThreadLocalLocation = true
PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.
LSDAEncoding = 0
TTypeEncoding = 0
CallSiteEncoding = 0
StaticCtorSection = nullptr
This section contains the static constructor pointer list.
StaticDtorSection = nullptr
This section contains the static destructor pointer list.
TM = nullptr
Protected Attributes inherited from llvm::MCObjectFileInfo
SupportsCompactUnwindWithoutEHFrame = false
True if the target object file supports emitting a compact unwind section without an associated EH frame section.
OmitDwarfIfHaveCompactUnwind = false
OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with compact unwind and other with dwarf unwind.
FDECFIEncoding = 0
FDE CFI encoding.
CompactUnwindDwarfEHFrameOnly = 0
Compact unwind encoding indicating that we should emit only an EH frame.
std::optional< sframe::ABI >
SFrameABIArch = {}
SFrame ABI architecture byte.
TextSection = nullptr
Section directive for standard text.
DataSection = nullptr
Section directive for standard data.
BSSSection = nullptr
Section that is default initialized to zero.
ReadOnlySection = nullptr
Section that is readonly and can contain arbitrary initialized data.
LSDASection = nullptr
If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to.
CallGraphSection = nullptr
Section containing call graph metadata.
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.
ImportCallSection = nullptr
If import call optimization is supported by the target, this is the section to emit import call data to.
DwarfAbbrevSection = nullptr
DwarfInfoSection = nullptr
DwarfLineSection = nullptr
DwarfLineStrSection = nullptr
DwarfFrameSection = nullptr
DwarfPubTypesSection = nullptr
DwarfDebugInlineSection = nullptr
DwarfStrSection = nullptr
DwarfLocSection = nullptr
DwarfARangesSection = nullptr
DwarfRangesSection = nullptr
DwarfMacinfoSection = nullptr
DwarfMacroSection = nullptr
DwarfPubNamesSection = nullptr
DwarfDebugNamesSection = nullptr
Accelerator table sections.
DwarfAccelNamesSection = nullptr
DwarfAccelObjCSection = nullptr
DwarfAccelNamespaceSection = nullptr
DwarfAccelTypesSection = nullptr
DwarfInfoDWOSection = nullptr
DwarfTypesDWOSection = nullptr
DwarfAbbrevDWOSection = nullptr
DwarfStrDWOSection = nullptr
DwarfLineDWOSection = nullptr
DwarfLocDWOSection = nullptr
DwarfStrOffDWOSection = nullptr
DwarfMacinfoDWOSection = nullptr
DwarfMacroDWOSection = nullptr
DwarfStrOffSection = nullptr
The DWARF v5 string offset and address table sections.
DwarfAddrSection = nullptr
DwarfRnglistsSection = nullptr
The DWARF v5 range list section.
DwarfLoclistsSection = nullptr
The DWARF v5 locations list section.
DwarfRnglistsDWOSection = nullptr
The DWARF v5 range and location list sections for fission.
DwarfLoclistsDWOSection = nullptr
DwarfCUIndexSection = nullptr
DwarfTUIndexSection = nullptr
DwarfGnuPubNamesSection = nullptr
Section for newer gnu pubnames.
DwarfGnuPubTypesSection = nullptr
Section for newer gnu pubtypes.
DwarfSwiftASTSection = nullptr
COFFDebugSymbolsSection = nullptr
COFFDebugTypesSection = nullptr
COFFGlobalTypeHashesSection = nullptr
TLSExtraDataSection = nullptr
Extra TLS Variable Data section.
TLSDataSection = nullptr
Section directive for Thread Local data. ELF, MachO, COFF, and Wasm.
TLSBSSSection = nullptr
Section directive for Thread Local uninitialized data.
StackMapSection = nullptr
StackMap section.
FaultMapSection = nullptr
FaultMap section.
RemarksSection = nullptr
Remarks section.
EHFrameSection = nullptr
EH frame section.
SFrameSection = nullptr
SFrame section.
StackSizesSection = nullptr
Section containing metadata on function stack sizes.
PseudoProbeSection = nullptr
Section for pseudo probe information used by AutoFDO.
PseudoProbeDescSection = nullptr
LLVMStatsSection = nullptr
DataRelROSection = nullptr
MergeableConst4Section = nullptr
MergeableConst8Section = nullptr
MergeableConst16Section = nullptr
MergeableConst32Section = nullptr
TLSTLVSection = nullptr
Section for thread local structure information.
TLSThreadInitSection = nullptr
Section for thread local data initialization functions.
CStringSection = nullptr
UStringSection = nullptr
TextCoalSection = nullptr
ConstTextCoalSection = nullptr
ConstDataSection = nullptr
DataCoalSection = nullptr
ConstDataCoalSection = nullptr
DataCommonSection = nullptr
DataBSSSection = nullptr
FourByteConstantSection = nullptr
EightByteConstantSection = nullptr
SixteenByteConstantSection = nullptr
LazySymbolPointerSection = nullptr
NonLazySymbolPointerSection = nullptr
ThreadLocalPointerSection = nullptr
AddrSigSection = nullptr
DrectveSection = nullptr
COFF specific sections.
PDataSection = nullptr
XDataSection = nullptr
SXDataSection = nullptr
GEHContSection = nullptr
GFIDsSection = nullptr
GIATsSection = nullptr
GLJMPSection = nullptr
PPA2ListSection = nullptr
ADASection = nullptr
IDRLSection = nullptr
TOCBaseSection = nullptr
ReadOnly8Section = nullptr
ReadOnly16Section = nullptr
std::array< MCSection *, binaryformat::Swift5ReflectionSectionKind::last >
Definition at line 15 of file LanaiTargetObjectFile.h.