LLVM  10.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::TargetLoweringObjectFile Class Referenceabstract

#include "llvm/Target/TargetLoweringObjectFile.h"

Inheritance diagram for llvm::TargetLoweringObjectFile:
[legend]
Collaboration diagram for llvm::TargetLoweringObjectFile:
[legend]

Public Member Functions

 TargetLoweringObjectFile ()=default
 
 TargetLoweringObjectFile (const TargetLoweringObjectFile &)=delete
 
TargetLoweringObjectFile & operator= (const TargetLoweringObjectFile &)=delete
 
virtual ~TargetLoweringObjectFile ()
 
MCContext & getContext () const
 
Mangler & getMangler () const
 
virtual void Initialize (MCContext &ctx, const TargetMachine &TM)
 This method must be called before any actual lowering is done. More...
 
virtual void emitPersonalityValue (MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const
 
virtual void emitModuleMetadata (MCStreamer &Streamer, Module &M) const
 Emit the module-level metadata that the platform cares about. More...
 
virtual void getModuleMetadata (Module &M)
 Get the module-level metadata that the platform cares about. More...
 
virtual MCSection * getSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const
 Given a constant with the SectionKind, return a section that it should be placed in. More...
 
MCSection * 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. More...
 
MCSection * SectionForGlobal (const GlobalObject *GO, const TargetMachine &TM) const
 This method computes the appropriate section to emit the specified global variable or function definition. More...
 
virtual void getNameWithPrefix (SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const
 
virtual MCSection * getSectionForJumpTable (const Function &F, const TargetMachine &TM) const
 
virtual bool shouldPutJumpTableInFunctionSection (bool UsesLabelDifference, const Function &F) const
 
virtual MCSection * getExplicitSectionGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0
 Targets should implement this method to assign a section to globals with an explicit section specfied. More...
 
virtual const MCExpr * getTTypeGlobalReference (const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const
 Return an MCExpr to use for a reference to the specified global variable from exception handling information. More...
 
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. More...
 
virtual MCSymbol * getCFIPersonalitySymbol (const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
 
unsigned getPersonalityEncoding () const
 
unsigned getLSDAEncoding () const
 
unsigned getTTypeEncoding () const
 
unsigned getCallSiteEncoding () const
 
const MCExpr * getTTypeReference (const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
 
virtual MCSection * getStaticCtorSection (unsigned Priority, const MCSymbol *KeySym) const
 
virtual MCSection * getStaticDtorSection (unsigned Priority, const MCSymbol *KeySym) const
 
virtual const MCExpr * getDebugThreadLocalSymbol (const MCSymbol *Sym) const
 Create a symbol reference to describe the given TLS variable when emitting the address in debug info. More...
 
virtual const MCExpr * lowerRelativeReference (const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const
 
bool 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? More...
 
bool supportGOTPCRelWithOffset () const
 Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset? More...
 
bool supportDebugThreadLocalLocation () const
 Target supports TLS offset relocation in debug section? More...
 
virtual const MCExpr * 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. More...
 
virtual void emitLinkerFlagsForGlobal (raw_ostream &OS, const GlobalValue *GV) const
 
virtual void emitLinkerFlagsForUsed (raw_ostream &OS, const GlobalValue *GV) const
 
virtual MCSection * getSectionForCommandLines () const
 If supported, return the section to use for the llvm.commandline metadata. More...
 
- Public Member Functions inherited from llvm::MCObjectFileInfo
void InitMCObjectFileInfo (const Triple &TT, bool PIC, MCContext &ctx, bool LargeCodeModel=false)
 
bool getSupportsWeakOmittedEHFrame () const
 
bool getSupportsCompactUnwindWithoutEHFrame () const
 
bool getOmitDwarfIfHaveCompactUnwind () const
 
bool getCommDirectiveSupportsAlignment () const
 
unsigned getFDEEncoding () const
 
unsigned getCompactUnwindDwarfEHFrameOnly () const
 
MCSection * getTextSection () const
 
MCSection * getDataSection () const
 
MCSection * getBSSSection () const
 
MCSection * getReadOnlySection () const
 
MCSection * getLSDASection () const
 
MCSection * getCompactUnwindSection () const
 
MCSection * getDwarfAbbrevSection () const
 
MCSection * getDwarfInfoSection () const
 
MCSection * getDwarfInfoSection (uint64_t Hash) const
 
MCSection * getDwarfLineSection () const
 
MCSection * getDwarfLineStrSection () const
 
MCSection * getDwarfFrameSection () const
 
MCSection * getDwarfPubNamesSection () const
 
MCSection * getDwarfPubTypesSection () const
 
MCSection * getDwarfGnuPubNamesSection () const
 
MCSection * getDwarfGnuPubTypesSection () const
 
const MCSection * getDwarfDebugInlineSection () const
 
MCSection * getDwarfStrSection () const
 
MCSection * getDwarfLocSection () const
 
MCSection * getDwarfARangesSection () const
 
MCSection * getDwarfRangesSection () const
 
MCSection * getDwarfRnglistsSection () const
 
MCSection * getDwarfLoclistsSection () const
 
MCSection * getDwarfMacinfoSection () const
 
MCSection * getDwarfDebugNamesSection () const
 
MCSection * getDwarfAccelNamesSection () const
 
MCSection * getDwarfAccelObjCSection () const
 
MCSection * getDwarfAccelNamespaceSection () const
 
MCSection * getDwarfAccelTypesSection () const
 
MCSection * getDwarfInfoDWOSection () const
 
MCSection * getDwarfTypesSection (uint64_t Hash) const
 
MCSection * getDwarfTypesDWOSection () const
 
MCSection * getDwarfAbbrevDWOSection () const
 
MCSection * getDwarfStrDWOSection () const
 
MCSection * getDwarfLineDWOSection () const
 
MCSection * getDwarfLocDWOSection () const
 
MCSection * getDwarfStrOffDWOSection () const
 
MCSection * getDwarfStrOffSection () const
 
MCSection * getDwarfAddrSection () const
 
MCSection * getDwarfRnglistsDWOSection () const
 
MCSection * getDwarfLoclistsDWOSection () const
 
MCSection * getDwarfMacinfoDWOSection () const
 
MCSection * getDwarfCUIndexSection () const
 
MCSection * getDwarfTUIndexSection () const
 
MCSection * getDwarfSwiftASTSection () const
 
MCSection * getCOFFDebugSymbolsSection () const
 
MCSection * getCOFFDebugTypesSection () const
 
MCSection * getCOFFGlobalTypeHashesSection () const
 
MCSection * getTLSExtraDataSection () const
 
const MCSection * getTLSDataSection () const
 
MCSection * getTLSBSSSection () const
 
MCSection * getStackMapSection () const
 
MCSection * getFaultMapSection () const
 
MCSection * getRemarksSection () const
 
MCSection * getStackSizesSection (const MCSection &TextSec) const
 
MCSection * getDataRelROSection () const
 
const MCSection * getMergeableConst4Section () const
 
const MCSection * getMergeableConst8Section () const
 
const MCSection * getMergeableConst16Section () const
 
const MCSection * getMergeableConst32Section () const
 
const MCSection * getTLSTLVSection () const
 
const MCSection * getTLSThreadInitSection () const
 
const MCSection * getCStringSection () const
 
const MCSection * getUStringSection () const
 
MCSection * getTextCoalSection () const
 
const MCSection * getConstTextCoalSection () const
 
const MCSection * getConstDataSection () const
 
const MCSection * getDataCoalSection () const
 
const MCSection * getConstDataCoalSection () const
 
const MCSection * getDataCommonSection () const
 
MCSection * getDataBSSSection () const
 
const MCSection * getFourByteConstantSection () const
 
const MCSection * getEightByteConstantSection () const
 
const MCSection * getSixteenByteConstantSection () const
 
MCSection * getLazySymbolPointerSection () const
 
MCSection * getNonLazySymbolPointerSection () const
 
MCSection * getThreadLocalPointerSection () const
 
MCSection * getDrectveSection () const
 
MCSection * getPDataSection () const
 
MCSection * getXDataSection () const
 
MCSection * getSXDataSection () const
 
MCSection * getGFIDsSection () const
 
MCSection * getGLJMPSection () const
 
MCSection * getEHFrameSection ()
 
Environment getObjectFileType () const
 
bool isPositionIndependent () const
 
const Triple & getTargetTriple () const
 
void setSDKVersion (const VersionTuple &TheSDKVersion)
 
const VersionTuple & getSDKVersion () const
 

Static Public Member Functions

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...
 

Protected Member Functions

virtual MCSection * SelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0
 

Protected Attributes

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
}
 

Detailed Description

Definition at line 38 of file TargetLoweringObjectFile.h.

Constructor & Destructor Documentation

◆ TargetLoweringObjectFile() [1/2]

llvm::TargetLoweringObjectFile::TargetLoweringObjectFile ( )
default

◆ TargetLoweringObjectFile() [2/2]

llvm::TargetLoweringObjectFile::TargetLoweringObjectFile ( const TargetLoweringObjectFile &  )
delete

◆ ~TargetLoweringObjectFile()

TargetLoweringObjectFile::~TargetLoweringObjectFile ( )
virtual

Definition at line 53 of file TargetLoweringObjectFile.cpp.

Member Function Documentation

◆ emitLinkerFlagsForGlobal()

virtual void llvm::TargetLoweringObjectFile::emitLinkerFlagsForGlobal ( raw_ostream &  OS,
const GlobalValue *  GV 
) const
inlinevirtual

Reimplemented in llvm::TargetLoweringObjectFileCOFF.

Definition at line 203 of file TargetLoweringObjectFile.h.

Referenced by llvm::AsmPrinter::doFinalization().

◆ emitLinkerFlagsForUsed()

virtual void llvm::TargetLoweringObjectFile::emitLinkerFlagsForUsed ( raw_ostream &  OS,
const GlobalValue *  GV 
) const
inlinevirtual

Reimplemented in llvm::TargetLoweringObjectFileCOFF.

Definition at line 206 of file TargetLoweringObjectFile.h.

Referenced by llvm::AsmPrinter::doFinalization().

◆ emitModuleMetadata()

virtual void llvm::TargetLoweringObjectFile::emitModuleMetadata ( MCStreamer &  Streamer,
Module &  M 
) const
inlinevirtual

Emit the module-level metadata that the platform cares about.

Reimplemented in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileMachO, and llvm::TargetLoweringObjectFileELF.

Definition at line 81 of file TargetLoweringObjectFile.h.

Referenced by llvm::AsmPrinter::doFinalization().

◆ emitPersonalityValue()

void TargetLoweringObjectFile::emitPersonalityValue ( MCStreamer &  Streamer,
const DataLayout &  TM,
const MCSymbol *  Sym 
) const
virtual

◆ getCallSiteEncoding()

unsigned llvm::TargetLoweringObjectFile::getCallSiteEncoding ( ) const
inline

◆ getCFIPersonalitySymbol()

MCSymbol * TargetLoweringObjectFile::getCFIPersonalitySymbol ( const GlobalValue *  GV,
const TargetMachine &  TM,
MachineModuleInfo *  MMI 
) const
virtual

◆ getContext()

MCContext& llvm::TargetLoweringObjectFile::getContext ( ) const
inline

Definition at line 69 of file TargetLoweringObjectFile.h.

Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), llvm::MipsTargetObjectFile::getDebugThreadLocalSymbol(), llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::XCoreTargetObjectFile::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileCOFF::getSectionForConstant(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileCOFF::getStaticCtorSection(), llvm::TargetLoweringObjectFileWasm::getStaticCtorSection(), llvm::TargetLoweringObjectFileCOFF::getStaticDtorSection(), llvm::TargetMachine::getSymbol(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), getTTypeGlobalReference(), getTTypeReference(), llvm::HexagonTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), llvm::TargetLoweringObjectFileWasm::InitializeWasm(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), llvm::R600AsmPrinter::runOnMachineFunction(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(), and llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection().

◆ getDebugThreadLocalSymbol()

const MCExpr * TargetLoweringObjectFile::getDebugThreadLocalSymbol ( const MCSymbol *  Sym) const
virtual

Create a symbol reference to describe the given TLS variable when emitting the address in debug info.

Reimplemented in llvm::X86ELFTargetObjectFile, llvm::MipsTargetObjectFile, and llvm::ARMElfTargetObjectFile.

Definition at line 337 of file TargetLoweringObjectFile.cpp.

References llvm::MCSymbolRefExpr::create().

Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), llvm::AddressPool::emit(), getStaticDtorSection(), and llvm::X86ELFTargetObjectFile::X86ELFTargetObjectFile().

◆ getExplicitSectionGlobal()

virtual MCSection* llvm::TargetLoweringObjectFile::getExplicitSectionGlobal ( const GlobalObject *  GO,
SectionKind  Kind,
const TargetMachine &  TM 
) const
pure virtual

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.

Implemented in llvm::TargetLoweringObjectFileXCOFF, llvm::TargetLoweringObjectFileWasm, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileELF, llvm::ARMElfTargetObjectFile, llvm::NVPTXTargetObjectFile, llvm::AMDGPUTargetObjectFile, llvm::XCoreTargetObjectFile, and llvm::HexagonTargetObjectFile.

Referenced by SectionForGlobal().

◆ getIndirectSymViaGOTPCRel()

virtual const MCExpr* llvm::TargetLoweringObjectFile::getIndirectSymViaGOTPCRel ( const GlobalValue *  GV,
const MCSymbol *  Sym,
const MCValue &  MV,
int64_t  Offset,
MachineModuleInfo *  MMI,
MCStreamer &  Streamer 
) const
inlinevirtual

Get the target specific PC relative GOT entry relocation.

Reimplemented in llvm::TargetLoweringObjectFileMachO, llvm::AArch64_MachoTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.

Definition at line 194 of file TargetLoweringObjectFile.h.

Referenced by handleIndirectSymViaGOTPCRel().

◆ getKindForGlobal()

SectionKind TargetLoweringObjectFile::getKindForGlobal ( const GlobalObject *  GO,
const TargetMachine &  TM 
)
static

Classify the specified global variable into a set of target independent categories embodied in SectionKind.

getKindForGlobal - This is a top-level target-independent classifier for a global object.

Given a global variable and information from the TM, this function classifies the global in a target independent manner. This function may be overridden by the target implementation.

Definition at line 143 of file TargetLoweringObjectFile.cpp.

References assert(), C, llvm::SectionKind::getBSS(), llvm::SectionKind::getBSSExtern(), llvm::SectionKind::getBSSLocal(), llvm::SectionKind::getCommon(), llvm::SectionKind::getData(), llvm::SectionKind::getMergeable1ByteCString(), llvm::SectionKind::getMergeable2ByteCString(), llvm::SectionKind::getMergeable4ByteCString(), llvm::SectionKind::getMergeableConst16(), llvm::SectionKind::getMergeableConst32(), llvm::SectionKind::getMergeableConst4(), llvm::SectionKind::getMergeableConst8(), llvm::SectionKind::getReadOnly(), llvm::SectionKind::getReadOnlyWithRel(), llvm::TargetMachine::getRelocationModel(), llvm::SectionKind::getText(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadData(), llvm::Value::getType(), llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalValue::isDeclaration(), IsNullTerminatedString(), isSuitableForBSS(), llvm::Constant::needsRelocation(), llvm::TargetOptions::NoZerosInBSS, llvm::TargetMachine::Options, llvm::Reloc::ROPI, llvm::Reloc::ROPI_RWPI, llvm::Reloc::RWPI, and llvm::Reloc::Static.

Referenced by llvm::AsmPrinter::EmitGlobalVariable(), getModuleMetadata(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), and SectionForGlobal().

◆ getLSDAEncoding()

unsigned llvm::TargetLoweringObjectFile::getLSDAEncoding ( ) const
inline

◆ getMangler()

Mangler& llvm::TargetLoweringObjectFile::getMangler ( ) const
inline

◆ getModuleMetadata()

virtual void llvm::TargetLoweringObjectFile::getModuleMetadata ( Module &  M)
inlinevirtual

Get the module-level metadata that the platform cares about.

Reimplemented in llvm::RISCVELFTargetObjectFile.

Definition at line 84 of file TargetLoweringObjectFile.h.

References C, getKindForGlobal(), getSectionForConstant(), and SectionForGlobal().

◆ getNameWithPrefix()

void TargetLoweringObjectFile::getNameWithPrefix ( SmallVectorImpl< char > &  OutName,
const GlobalValue *  GV,
const TargetMachine &  TM 
) const
virtual

◆ getPersonalityEncoding()

unsigned llvm::TargetLoweringObjectFile::getPersonalityEncoding ( ) const
inline

◆ getSectionForCommandLines()

virtual MCSection* llvm::TargetLoweringObjectFile::getSectionForCommandLines ( ) const
inlinevirtual

If supported, return the section to use for the llvm.commandline metadata.

Otherwise, return nullptr.

Reimplemented in llvm::TargetLoweringObjectFileELF.

Definition at line 211 of file TargetLoweringObjectFile.h.

References SelectSectionForGlobal().

Referenced by llvm::AsmPrinter::EmitSpecialLLVMGlobal().

◆ getSectionForConstant()

MCSection * TargetLoweringObjectFile::getSectionForConstant ( const DataLayout &  DL,
SectionKind  Kind,
const Constant *  C,
unsigned &  Align 
) const
virtual

◆ getSectionForJumpTable()

MCSection * TargetLoweringObjectFile::getSectionForJumpTable ( const Function &  F,
const TargetMachine &  TM 
) const
virtual

◆ getStaticCtorSection()

virtual MCSection* llvm::TargetLoweringObjectFile::getStaticCtorSection ( unsigned  Priority,
const MCSymbol *  KeySym 
) const
inlinevirtual

◆ getStaticDtorSection()

virtual MCSection* llvm::TargetLoweringObjectFile::getStaticDtorSection ( unsigned  Priority,
const MCSymbol *  KeySym 
) const
inlinevirtual

◆ getSymbolWithGlobalValueBase()

MCSymbol * TargetLoweringObjectFile::getSymbolWithGlobalValueBase ( const GlobalValue *  GV,
StringRef  Suffix,
const TargetMachine &  TM 
) const

◆ getTTypeEncoding()

unsigned llvm::TargetLoweringObjectFile::getTTypeEncoding ( ) const
inline

Definition at line 150 of file TargetLoweringObjectFile.h.

References TTypeEncoding.

Referenced by llvm::EHStreamer::emitExceptionTable().

◆ getTTypeGlobalReference()

const MCExpr * TargetLoweringObjectFile::getTTypeGlobalReference ( const GlobalValue *  GV,
unsigned  Encoding,
const TargetMachine &  TM,
MachineModuleInfo *  MMI,
MCStreamer &  Streamer 
) const
virtual

Return an MCExpr to use for a reference to the specified global variable from exception handling information.

getTTypeGlobalReference - Return an MCExpr to use for a reference to the specified global variable from exception handling information.

Reimplemented in llvm::TargetLoweringObjectFileMachO, llvm::TargetLoweringObjectFileELF, llvm::AArch64_MachoTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::ARMElfTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.

Definition at line 308 of file TargetLoweringObjectFile.cpp.

References llvm::MCSymbolRefExpr::create(), getContext(), llvm::TargetMachine::getSymbol(), getTTypeReference(), and llvm::Ref.

Referenced by llvm::AsmPrinter::EmitTTypeReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), and SectionForGlobal().

◆ getTTypeReference()

const MCExpr * TargetLoweringObjectFile::getTTypeReference ( const MCSymbolRefExpr *  Sym,
unsigned  Encoding,
MCStreamer &  Streamer 
) const

◆ Initialize()

void TargetLoweringObjectFile::Initialize ( MCContext &  ctx,
const TargetMachine &  TM 
)
virtual

◆ lowerRelativeReference()

virtual const MCExpr* llvm::TargetLoweringObjectFile::lowerRelativeReference ( const GlobalValue *  LHS,
const GlobalValue *  RHS,
const TargetMachine &  TM 
) const
inlinevirtual

◆ operator=()

TargetLoweringObjectFile& llvm::TargetLoweringObjectFile::operator= ( const TargetLoweringObjectFile &  )
delete

◆ SectionForGlobal() [1/2]

MCSection * TargetLoweringObjectFile::SectionForGlobal ( const GlobalObject *  GO,
SectionKind  Kind,
const TargetMachine &  TM 
) const

◆ SectionForGlobal() [2/2]

MCSection* llvm::TargetLoweringObjectFile::SectionForGlobal ( const GlobalObject *  GO,
const TargetMachine &  TM 
) const
inline

This method computes the appropriate section to emit the specified global variable or function definition.

This should not be passed external (or available externally) globals.

Definition at line 107 of file TargetLoweringObjectFile.h.

References F(), getCFIPersonalitySymbol(), getExplicitSectionGlobal(), getKindForGlobal(), getNameWithPrefix(), getSectionForJumpTable(), getSymbolWithGlobalValueBase(), getTTypeGlobalReference(), SectionForGlobal(), and shouldPutJumpTableInFunctionSection().

◆ SelectSectionForGlobal()

virtual MCSection* llvm::TargetLoweringObjectFile::SelectSectionForGlobal ( const GlobalObject *  GO,
SectionKind  Kind,
const TargetMachine &  TM 
) const
protectedpure virtual

◆ shouldPutJumpTableInFunctionSection()

bool TargetLoweringObjectFile::shouldPutJumpTableInFunctionSection ( bool  UsesLabelDifference,
const Function &  F 
) const
virtual

◆ supportDebugThreadLocalLocation()

bool llvm::TargetLoweringObjectFile::supportDebugThreadLocalLocation ( ) const
inline

Target supports TLS offset relocation in debug section?

Definition at line 189 of file TargetLoweringObjectFile.h.

References SupportDebugThreadLocalLocation.

Referenced by llvm::DwarfCompileUnit::addLocationAttribute().

◆ supportGOTPCRelWithOffset()

bool llvm::TargetLoweringObjectFile::supportGOTPCRelWithOffset ( ) const
inline

Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?

Definition at line 184 of file TargetLoweringObjectFile.h.

References SupportGOTPCRelWithOffset.

Referenced by handleIndirectSymViaGOTPCRel().

◆ supportIndirectSymViaGOTPCRel()

bool llvm::TargetLoweringObjectFile::supportIndirectSymViaGOTPCRel ( ) const
inline

Target supports replacing a data "PC"-relative access to a symbol through another symbol, by accessing the later via a GOT entry instead?

Definition at line 178 of file TargetLoweringObjectFile.h.

References SupportIndirectSymViaGOTPCRel.

Referenced by emitGlobalConstantImpl().

Member Data Documentation

◆ CallSiteEncoding

unsigned llvm::TargetLoweringObjectFile::CallSiteEncoding = 0
protected

Definition at line 54 of file TargetLoweringObjectFile.h.

Referenced by getCallSiteEncoding(), and Initialize().

◆ LSDAEncoding

unsigned llvm::TargetLoweringObjectFile::LSDAEncoding = 0
protected

◆ PersonalityEncoding

unsigned llvm::TargetLoweringObjectFile::PersonalityEncoding = 0
protected

PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.

Definition at line 51 of file TargetLoweringObjectFile.h.

Referenced by getPersonalityEncoding(), Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), and llvm::TargetLoweringObjectFileXCOFF::Initialize().

◆ StaticCtorSection

MCSection* llvm::TargetLoweringObjectFile::StaticCtorSection = nullptr
protected

◆ StaticDtorSection

MCSection* llvm::TargetLoweringObjectFile::StaticDtorSection = nullptr
protected

◆ SupportDebugThreadLocalLocation

bool llvm::TargetLoweringObjectFile::SupportDebugThreadLocalLocation = true
protected

Definition at line 47 of file TargetLoweringObjectFile.h.

Referenced by supportDebugThreadLocalLocation().

◆ SupportGOTPCRelWithOffset

bool llvm::TargetLoweringObjectFile::SupportGOTPCRelWithOffset = true
protected

◆ SupportIndirectSymViaGOTPCRel

bool llvm::TargetLoweringObjectFile::SupportIndirectSymViaGOTPCRel = false
protected

◆ TTypeEncoding

unsigned llvm::TargetLoweringObjectFile::TTypeEncoding = 0
protected

The documentation for this class was generated from the following files: