LLVM  6.0.0svn
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:
Inheritance graph
[legend]
Collaboration diagram for llvm::TargetLoweringObjectFile:
Collaboration graph
[legend]

Public Member Functions

 TargetLoweringObjectFile ()=default
 
 TargetLoweringObjectFile (const TargetLoweringObjectFile &)=delete
 
TargetLoweringObjectFileoperator= (const TargetLoweringObjectFile &)=delete
 
virtual ~TargetLoweringObjectFile ()
 
MCContextgetContext () const
 
ManglergetMangler () 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 TargetMachine &TM) const
 Emit the module-level metadata that the platform cares about. More...
 
virtual MCSectiongetSectionForConstant (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...
 
MCSectionSectionForGlobal (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...
 
MCSectionSectionForGlobal (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 MCSectiongetSectionForJumpTable (const Function &F, const TargetMachine &TM) const
 
virtual bool shouldPutJumpTableInFunctionSection (bool UsesLabelDifference, const Function &F) const
 
virtual MCSectiongetExplicitSectionGlobal (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 MCExprgetTTypeGlobalReference (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...
 
MCSymbolgetSymbolWithGlobalValueBase (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 MCSymbolgetCFIPersonalitySymbol (const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
 
const MCExprgetTTypeReference (const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
 
virtual MCSectiongetStaticCtorSection (unsigned Priority, const MCSymbol *KeySym) const
 
virtual MCSectiongetStaticDtorSection (unsigned Priority, const MCSymbol *KeySym) const
 
virtual const MCExprgetDebugThreadLocalSymbol (const MCSymbol *Sym) const
 Create a symbol reference to describe the given TLS variable when emitting the address in debug info. More...
 
virtual const MCExprlowerRelativeReference (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...
 
virtual const MCExprgetIndirectSymViaGOTPCRel (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
 
- 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 getPersonalityEncoding () const
 
unsigned getLSDAEncoding () const
 
unsigned getFDEEncoding () const
 
unsigned getTTypeEncoding () const
 
unsigned getCompactUnwindDwarfEHFrameOnly () const
 
MCSectiongetTextSection () const
 
MCSectiongetDataSection () const
 
MCSectiongetBSSSection () const
 
MCSectiongetReadOnlySection () const
 
MCSectiongetLSDASection () const
 
MCSectiongetCompactUnwindSection () const
 
MCSectiongetDwarfAbbrevSection () const
 
MCSectiongetDwarfInfoSection () const
 
MCSectiongetDwarfLineSection () const
 
MCSectiongetDwarfFrameSection () const
 
MCSectiongetDwarfPubNamesSection () const
 
MCSectiongetDwarfPubTypesSection () const
 
MCSectiongetDwarfGnuPubNamesSection () const
 
MCSectiongetDwarfGnuPubTypesSection () const
 
const MCSectiongetDwarfDebugInlineSection () const
 
MCSectiongetDwarfStrSection () const
 
MCSectiongetDwarfLocSection () const
 
MCSectiongetDwarfARangesSection () const
 
MCSectiongetDwarfRangesSection () const
 
MCSectiongetDwarfMacinfoSection () const
 
MCSectiongetDwarfAccelNamesSection () const
 
MCSectiongetDwarfAccelObjCSection () const
 
MCSectiongetDwarfAccelNamespaceSection () const
 
MCSectiongetDwarfAccelTypesSection () const
 
MCSectiongetDwarfInfoDWOSection () const
 
MCSectiongetDwarfTypesSection (uint64_t Hash) const
 
MCSectiongetDwarfTypesDWOSection () const
 
MCSectiongetDwarfAbbrevDWOSection () const
 
MCSectiongetDwarfStrDWOSection () const
 
MCSectiongetDwarfLineDWOSection () const
 
MCSectiongetDwarfLocDWOSection () const
 
MCSectiongetDwarfStrOffDWOSection () const
 
MCSectiongetDwarfStrOffSection () const
 
MCSectiongetDwarfAddrSection () const
 
MCSectiongetDwarfCUIndexSection () const
 
MCSectiongetDwarfTUIndexSection () const
 
MCSectiongetDwarfSwiftASTSection () const
 
MCSectiongetCOFFDebugSymbolsSection () const
 
MCSectiongetCOFFDebugTypesSection () const
 
MCSectiongetTLSExtraDataSection () const
 
const MCSectiongetTLSDataSection () const
 
MCSectiongetTLSBSSSection () const
 
MCSectiongetStackMapSection () const
 
MCSectiongetFaultMapSection () const
 
MCSectiongetDataRelROSection () const
 
const MCSectiongetMergeableConst4Section () const
 
const MCSectiongetMergeableConst8Section () const
 
const MCSectiongetMergeableConst16Section () const
 
const MCSectiongetMergeableConst32Section () const
 
const MCSectiongetTLSTLVSection () const
 
const MCSectiongetTLSThreadInitSection () const
 
const MCSectiongetCStringSection () const
 
const MCSectiongetUStringSection () const
 
MCSectiongetTextCoalSection () const
 
const MCSectiongetConstTextCoalSection () const
 
const MCSectiongetConstDataSection () const
 
const MCSectiongetDataCoalSection () const
 
const MCSectiongetDataCommonSection () const
 
MCSectiongetDataBSSSection () const
 
const MCSectiongetFourByteConstantSection () const
 
const MCSectiongetEightByteConstantSection () const
 
const MCSectiongetSixteenByteConstantSection () const
 
MCSectiongetLazySymbolPointerSection () const
 
MCSectiongetNonLazySymbolPointerSection () const
 
MCSectiongetThreadLocalPointerSection () const
 
MCSectiongetDrectveSection () const
 
MCSectiongetPDataSection () const
 
MCSectiongetXDataSection () const
 
MCSectiongetSXDataSection () const
 
MCSectiongetEHFrameSection ()
 
Environment getObjectFileType () const
 
bool isPositionIndependent () const
 
const TriplegetTargetTriple () 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 MCSectionSelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0
 

Protected Attributes

bool SupportIndirectSymViaGOTPCRel = false
 
bool SupportGOTPCRelWithOffset = true
 
MCSectionStaticCtorSection = nullptr
 This section contains the static constructor pointer list. More...
 
MCSectionStaticDtorSection = nullptr
 This section contains the static destructor pointer list. More...
 
- Protected Attributes inherited from llvm::MCObjectFileInfo
bool CommDirectiveSupportsAlignment
 True if .comm supports alignment. More...
 
bool SupportsWeakOmittedEHFrame
 True if target object file supports a weak_definition of constant 0 for an omitted EH frame. More...
 
bool SupportsCompactUnwindWithoutEHFrame
 True if the target object file supports emitting a compact unwind section without an associated EH frame section. More...
 
bool OmitDwarfIfHaveCompactUnwind
 OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with compact unwind and other with dwarf unwind. More...
 
unsigned PersonalityEncoding
 PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH. More...
 
unsigned LSDAEncoding
 
unsigned FDECFIEncoding
 
unsigned TTypeEncoding
 
unsigned CompactUnwindDwarfEHFrameOnly
 Compact unwind encoding indicating that we should emit only an EH frame. More...
 
MCSectionTextSection
 Section directive for standard text. More...
 
MCSectionDataSection
 Section directive for standard data. More...
 
MCSectionBSSSection
 Section that is default initialized to zero. More...
 
MCSectionReadOnlySection
 Section that is readonly and can contain arbitrary initialized data. More...
 
MCSectionLSDASection
 If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to. More...
 
MCSectionCompactUnwindSection
 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...
 
MCSectionDwarfAbbrevSection
 
MCSectionDwarfInfoSection
 
MCSectionDwarfLineSection
 
MCSectionDwarfFrameSection
 
MCSectionDwarfPubTypesSection
 
const MCSectionDwarfDebugInlineSection
 
MCSectionDwarfStrSection
 
MCSectionDwarfLocSection
 
MCSectionDwarfARangesSection
 
MCSectionDwarfRangesSection
 
MCSectionDwarfMacinfoSection
 
MCSectionDwarfPubNamesSection
 
MCSectionDwarfAccelNamesSection
 DWARF5 Experimental Debug Info Sections DwarfAccelNamesSection, DwarfAccelObjCSection, DwarfAccelNamespaceSection, DwarfAccelTypesSection - If we use the DWARF accelerated hash tables then we want to emit these sections. More...
 
MCSectionDwarfAccelObjCSection
 
MCSectionDwarfAccelNamespaceSection
 
MCSectionDwarfAccelTypesSection
 
MCSectionDwarfInfoDWOSection
 
MCSectionDwarfTypesDWOSection
 
MCSectionDwarfAbbrevDWOSection
 
MCSectionDwarfStrDWOSection
 
MCSectionDwarfLineDWOSection
 
MCSectionDwarfLocDWOSection
 
MCSectionDwarfStrOffDWOSection
 
MCSectionDwarfStrOffSection
 The DWARF v5 string offset and address table sections. More...
 
MCSectionDwarfAddrSection
 
MCSectionDwarfCUIndexSection
 
MCSectionDwarfTUIndexSection
 
MCSectionDwarfGnuPubNamesSection
 Section for newer gnu pubnames. More...
 
MCSectionDwarfGnuPubTypesSection
 Section for newer gnu pubtypes. More...
 
MCSectionDwarfSwiftASTSection
 
MCSectionCOFFDebugSymbolsSection
 
MCSectionCOFFDebugTypesSection
 
MCSectionTLSExtraDataSection
 Extra TLS Variable Data section. More...
 
MCSectionTLSDataSection
 Section directive for Thread Local data. ELF, MachO, COFF, and Wasm. More...
 
MCSectionTLSBSSSection
 Section directive for Thread Local uninitialized data. More...
 
MCSectionStackMapSection
 StackMap section. More...
 
MCSectionFaultMapSection
 FaultMap section. More...
 
MCSectionEHFrameSection
 EH frame section. More...
 
MCSectionDataRelROSection
 
MCSectionMergeableConst4Section
 
MCSectionMergeableConst8Section
 
MCSectionMergeableConst16Section
 
MCSectionMergeableConst32Section
 
MCSectionTLSTLVSection
 Section for thread local structure information. More...
 
const MCSectionTLSThreadInitSection
 Section for thread local data initialization functions. More...
 
MCSectionCStringSection
 
MCSectionUStringSection
 
MCSectionTextCoalSection
 
MCSectionConstTextCoalSection
 
MCSectionConstDataSection
 
MCSectionDataCoalSection
 
MCSectionDataCommonSection
 
MCSectionDataBSSSection
 
MCSectionFourByteConstantSection
 
MCSectionEightByteConstantSection
 
MCSectionSixteenByteConstantSection
 
MCSectionLazySymbolPointerSection
 
MCSectionNonLazySymbolPointerSection
 
MCSectionThreadLocalPointerSection
 
MCSectionDrectveSection
 COFF specific sections. More...
 
MCSectionPDataSection
 
MCSectionXDataSection
 
MCSectionSXDataSection
 

Additional Inherited Members

- Public Types inherited from llvm::MCObjectFileInfo
enum  Environment { IsMachO, IsELF, IsCOFF, IsWasm }
 

Detailed Description

Definition at line 39 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 183 of file TargetLoweringObjectFile.h.

References SelectSectionForGlobal().

◆ emitModuleMetadata()

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

◆ emitPersonalityValue()

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

◆ getCFIPersonalitySymbol()

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

◆ getContext()

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

Definition at line 62 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::getSectionForJumpTable(), llvm::TargetLoweringObjectFileCOFF::getStaticCtorSection(), llvm::TargetLoweringObjectFileCOFF::getStaticDtorSection(), llvm::TargetMachine::getSymbol(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), getTTypeGlobalReference(), getTTypeReference(), llvm::HexagonTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), llvm::TargetLoweringObjectFileWasm::InitializeWasm(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal(), and llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection().

◆ getDebugThreadLocalSymbol()

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

◆ 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::TargetLoweringObjectFileWasm, llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileMachO, llvm::NVPTXTargetObjectFile, llvm::TargetLoweringObjectFileELF, llvm::ARMElfTargetObjectFile, llvm::XCoreTargetObjectFile, and llvm::HexagonTargetObjectFile.

Referenced by SectionForGlobal().

◆ getIndirectSymViaGOTPCRel()

virtual const MCExpr* llvm::TargetLoweringObjectFile::getIndirectSymViaGOTPCRel ( 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 175 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 variable.

Given an global variable and information from TM, it classifies the global in a variety of ways that make various target implementations simpler. The target implementation is free to ignore this extra info of course.

Definition at line 135 of file TargetLoweringObjectFile.cpp.

References assert(), C, llvm::dyn_cast(), 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(), emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), llvm::LanaiTargetObjectFile::isGlobalInSmallSection(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), and SectionForGlobal().

◆ getMangler()

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

◆ getNameWithPrefix()

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

◆ getSectionForConstant()

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

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 in llvm::TargetLoweringObjectFileMachO, llvm::NVPTXTargetObjectFile, llvm::TargetLoweringObjectFileELF, llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, and llvm::XCoreTargetObjectFile.

Definition at line 286 of file TargetLoweringObjectFile.cpp.

References llvm::MCObjectFileInfo::DataSection, llvm::SectionKind::isReadOnly(), and llvm::MCObjectFileInfo::ReadOnlySection.

Referenced by llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::EmitConstantPool(), emitModuleMetadata(), getSectionForJumpTable(), and scalarConstantToHexString().

◆ 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

◆ 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::ARMElfTargetObjectFile, llvm::AArch64_MachoTargetObjectFile, llvm::SparcELFTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.

Definition at line 298 of file TargetLoweringObjectFile.cpp.

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

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

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 in llvm::TargetLoweringObjectFileCOFF, llvm::TargetLoweringObjectFileMachO, llvm::NVPTXTargetObjectFile, llvm::WebAssemblyTargetObjectFile, llvm::ARMElfTargetObjectFile, llvm::MipsTargetObjectFile, llvm::LanaiTargetObjectFile, llvm::SparcELFTargetObjectFile, llvm::WebAssemblyTargetObjectFileELF, llvm::XCoreTargetObjectFile, llvm::AVRTargetObjectFile, and llvm::HexagonTargetObjectFile.

Definition at line 43 of file TargetLoweringObjectFile.cpp.

References llvm::TargetMachine::getCodeModel(), llvm::TargetMachine::getTargetTriple(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm::TargetMachine::isPositionIndependent(), and llvm::CodeModel::Large.

Referenced by llvm::X86ELFTargetObjectFile::getDebugThreadLocalSymbol(), getMangler(), llvm::HexagonTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::WebAssemblyTargetObjectFileELF::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::WebAssemblyTargetObjectFile::Initialize(), llvm::NVPTXTargetObjectFile::Initialize(), llvm::TargetLoweringObjectFileMachO::Initialize(), and llvm::TargetLoweringObjectFileCOFF::Initialize().

◆ 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

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 237 of file TargetLoweringObjectFile.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, F(), getExplicitSectionGlobal(), llvm::GlobalObject::hasSection(), llvm::SectionKind::isBSS(), llvm::SectionKind::isData(), llvm::SectionKind::isReadOnly(), and SelectSectionForGlobal().

Referenced by llvm::AsmPrinter::EmitGlobalVariable(), emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::getNameWithPrefix(), and SectionForGlobal().

◆ 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 98 of file TargetLoweringObjectFile.h.

References F(), getCFIPersonalitySymbol(), getExplicitSectionGlobal(), getKindForGlobal(), getNameWithPrefix(), getSectionForJumpTable(), getSymbolWithGlobalValueBase(), getTTypeGlobalReference(), getTTypeReference(), 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

◆ supportGOTPCRelWithOffset()

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

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

Definition at line 170 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 164 of file TargetLoweringObjectFile.h.

References SupportIndirectSymViaGOTPCRel.

Referenced by emitGlobalConstantImpl().

Member Data Documentation

◆ StaticCtorSection

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

◆ StaticDtorSection

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

◆ SupportGOTPCRelWithOffset

bool llvm::TargetLoweringObjectFile::SupportGOTPCRelWithOffset = true
protected

◆ SupportIndirectSymViaGOTPCRel

bool llvm::TargetLoweringObjectFile::SupportIndirectSymViaGOTPCRel = false
protected

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