LLVM  12.0.0git
Public Member Functions | List of all members
llvm::TargetLoweringObjectFileWasm Class Reference

#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"

Inheritance diagram for llvm::TargetLoweringObjectFileWasm:
Inheritance graph
Collaboration diagram for llvm::TargetLoweringObjectFileWasm:
Collaboration graph

Public Member Functions

 TargetLoweringObjectFileWasm ()=default
 ~TargetLoweringObjectFileWasm () override=default
MCSectiongetExplicitSectionGlobal (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. More...
MCSectionSelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
bool shouldPutJumpTableInFunctionSection (bool UsesLabelDifference, const Function &F) const override
void InitializeWasm ()
MCSectiongetStaticCtorSection (unsigned Priority, const MCSymbol *KeySym) const override
MCSectiongetStaticDtorSection (unsigned Priority, const MCSymbol *KeySym) const override
const MCExprlowerRelativeReference (const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const override
- Public Member Functions inherited from llvm::TargetLoweringObjectFile
 TargetLoweringObjectFile ()=default
 TargetLoweringObjectFile (const TargetLoweringObjectFile &)=delete
TargetLoweringObjectFileoperator= (const TargetLoweringObjectFile &)=delete
virtual ~TargetLoweringObjectFile ()
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
 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 MCSectiongetSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const
 Given a constant with the SectionKind, return a section that it should be placed in. More...
virtual MCSectiongetSectionForMachineBasicBlock (const Function &F, const MachineBasicBlock &MBB, const TargetMachine &TM) const
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 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
unsigned getPersonalityEncoding () const
unsigned getLSDAEncoding () const
unsigned getTTypeEncoding () const
unsigned getCallSiteEncoding () const
const MCExprgetTTypeReference (const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) 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...
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 MCExprgetIndirectSymViaGOTPCRel (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 MCSectiongetSectionForCommandLines () const
 If supported, return the section to use for the llvm.commandline metadata. More...
virtual MCSectiongetSectionForFunctionDescriptor (const Function *F, const TargetMachine &TM) const
 On targets that use separate function descriptor symbols, return a section for the descriptor given its symbol. More...
virtual MCSectiongetSectionForTOCEntry (const MCSymbol *S) const
 On targets that support TOC entries, return a section for the entry given the symbol it refers to. More...
virtual MCSectiongetSectionForExternalReference (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. More...
virtual MCSymbolgetTargetSymbol (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. More...
virtual MCSymbolgetFunctionEntryPointSymbol (const Function *F, const TargetMachine &TM) const
 If supported, return the function entry point symbol. More...
- Public Member Functions inherited from llvm::MCObjectFileInfo
void InitMCObjectFileInfo (const Triple &TT, bool PIC, MCContext &ctx, bool LargeCodeModel=false)
MCContextgetContext () const
bool getSupportsWeakOmittedEHFrame () const
bool getSupportsCompactUnwindWithoutEHFrame () const
bool getOmitDwarfIfHaveCompactUnwind () const
bool getCommDirectiveSupportsAlignment () const
unsigned getFDEEncoding () const
unsigned getCompactUnwindDwarfEHFrameOnly () const
MCSectiongetTextSection () const
MCSectiongetDataSection () const
MCSectiongetBSSSection () const
MCSectiongetReadOnlySection () const
MCSectiongetLSDASection () const
MCSectiongetCompactUnwindSection () const
MCSectiongetDwarfAbbrevSection () const
MCSectiongetDwarfInfoSection () const
MCSectiongetDwarfInfoSection (uint64_t Hash) const
MCSectiongetDwarfLineSection () const
MCSectiongetDwarfLineStrSection () const
MCSectiongetDwarfFrameSection () const
MCSectiongetDwarfPubNamesSection () const
MCSectiongetDwarfPubTypesSection () const
MCSectiongetDwarfGnuPubNamesSection () const
MCSectiongetDwarfGnuPubTypesSection () const
const MCSectiongetDwarfDebugInlineSection () const
MCSectiongetDwarfStrSection () const
MCSectiongetDwarfLocSection () const
MCSectiongetDwarfARangesSection () const
MCSectiongetDwarfRangesSection () const
MCSectiongetDwarfRnglistsSection () const
MCSectiongetDwarfLoclistsSection () const
MCSectiongetDwarfMacinfoSection () const
MCSectiongetDwarfMacroSection () const
MCSectiongetDwarfDebugNamesSection () 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
MCSectiongetDwarfRnglistsDWOSection () const
MCSectiongetDwarfLoclistsDWOSection () const
MCSectiongetDwarfMacroDWOSection () const
MCSectiongetDwarfMacinfoDWOSection () const
MCSectiongetDwarfCUIndexSection () const
MCSectiongetDwarfTUIndexSection () const
MCSectiongetDwarfSwiftASTSection () const
MCSectiongetCOFFDebugSymbolsSection () const
MCSectiongetCOFFDebugTypesSection () const
MCSectiongetCOFFGlobalTypeHashesSection () const
MCSectiongetTLSExtraDataSection () const
const MCSectiongetTLSDataSection () const
MCSectiongetTLSBSSSection () const
MCSectiongetStackMapSection () const
MCSectiongetFaultMapSection () const
MCSectiongetRemarksSection () const
MCSectiongetStackSizesSection (const MCSection &TextSec) 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 MCSectiongetConstDataCoalSection () 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
MCSectiongetGFIDsSection () const
MCSectiongetGLJMPSection () const
MCSectiongetTOCBaseSection () const
MCSectiongetEHFrameSection ()
Environment getObjectFileType () const
bool isPositionIndependent () const
const TriplegetTargetTriple () const
void setSDKVersion (const VersionTuple &TheSDKVersion)
const VersionTuplegetSDKVersion () const

Additional Inherited Members

- Public Types inherited from llvm::MCObjectFileInfo
enum  Environment {
  IsMachO, IsELF, IsCOFF, IsWasm,
- Static Public Member Functions inherited from llvm::TargetLoweringObjectFile
static SectionKind getKindForGlobal (const GlobalObject *GO, const TargetMachine &TM)
 Classify the specified global variable into a set of target independent categories embodied in SectionKind. More...
- Protected Attributes inherited from llvm::TargetLoweringObjectFile
bool SupportIndirectSymViaGOTPCRel = false
bool SupportGOTPCRelWithOffset = true
bool SupportDebugThreadLocalLocation = true
unsigned PersonalityEncoding = 0
 PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH. More...
unsigned LSDAEncoding = 0
unsigned TTypeEncoding = 0
unsigned CallSiteEncoding = 0
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 = 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...
MCSectionTextSection = nullptr
 Section directive for standard text. More...
MCSectionDataSection = nullptr
 Section directive for standard data. More...
MCSectionBSSSection = nullptr
 Section that is default initialized to zero. More...
MCSectionReadOnlySection = nullptr
 Section that is readonly and can contain arbitrary initialized data. More...
MCSectionLSDASection = nullptr
 If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to. More...
MCSectionCompactUnwindSection = 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...
MCSectionDwarfAbbrevSection = nullptr
MCSectionDwarfInfoSection = nullptr
MCSectionDwarfLineSection = nullptr
MCSectionDwarfLineStrSection = nullptr
MCSectionDwarfFrameSection = nullptr
MCSectionDwarfPubTypesSection = nullptr
const MCSectionDwarfDebugInlineSection = nullptr
MCSectionDwarfStrSection = nullptr
MCSectionDwarfLocSection = nullptr
MCSectionDwarfARangesSection = nullptr
MCSectionDwarfRangesSection = nullptr
MCSectionDwarfMacinfoSection = nullptr
MCSectionDwarfMacroSection = nullptr
MCSectionDwarfPubNamesSection = nullptr
MCSectionDwarfDebugNamesSection = nullptr
 Accelerator table sections. More...
MCSectionDwarfAccelNamesSection = nullptr
MCSectionDwarfAccelObjCSection = nullptr
MCSectionDwarfAccelNamespaceSection = nullptr
MCSectionDwarfAccelTypesSection = nullptr
MCSectionDwarfInfoDWOSection = nullptr
MCSectionDwarfTypesDWOSection = nullptr
MCSectionDwarfAbbrevDWOSection = nullptr
MCSectionDwarfStrDWOSection = nullptr
MCSectionDwarfLineDWOSection = nullptr
MCSectionDwarfLocDWOSection = nullptr
MCSectionDwarfStrOffDWOSection = nullptr
MCSectionDwarfMacinfoDWOSection = nullptr
MCSectionDwarfMacroDWOSection = nullptr
MCSectionDwarfStrOffSection = nullptr
 The DWARF v5 string offset and address table sections. More...
MCSectionDwarfAddrSection = nullptr
MCSectionDwarfRnglistsSection = nullptr
 The DWARF v5 range list section. More...
MCSectionDwarfLoclistsSection = nullptr
 The DWARF v5 locations list section. More...
MCSectionDwarfRnglistsDWOSection = nullptr
 The DWARF v5 range and location list sections for fission. More...
MCSectionDwarfLoclistsDWOSection = nullptr
MCSectionDwarfCUIndexSection = nullptr
MCSectionDwarfTUIndexSection = nullptr
MCSectionDwarfGnuPubNamesSection = nullptr
 Section for newer gnu pubnames. More...
MCSectionDwarfGnuPubTypesSection = nullptr
 Section for newer gnu pubtypes. More...
MCSectionDwarfSwiftASTSection = nullptr
MCSectionCOFFDebugSymbolsSection = nullptr
MCSectionCOFFDebugTypesSection = nullptr
MCSectionCOFFGlobalTypeHashesSection = nullptr
MCSectionTLSExtraDataSection = nullptr
 Extra TLS Variable Data section. More...
MCSectionTLSDataSection = nullptr
 Section directive for Thread Local data. ELF, MachO, COFF, and Wasm. More...
MCSectionTLSBSSSection = nullptr
 Section directive for Thread Local uninitialized data. More...
MCSectionStackMapSection = nullptr
 StackMap section. More...
MCSectionFaultMapSection = nullptr
 FaultMap section. More...
MCSectionRemarksSection = nullptr
 Remarks section. More...
MCSectionEHFrameSection = nullptr
 EH frame section. More...
MCSectionStackSizesSection = nullptr
 Section containing metadata on function stack sizes. More...
MCSectionDataRelROSection = nullptr
MCSectionMergeableConst4Section = nullptr
MCSectionMergeableConst8Section = nullptr
MCSectionMergeableConst16Section = nullptr
MCSectionMergeableConst32Section = nullptr
MCSectionTLSTLVSection = nullptr
 Section for thread local structure information. More...
const MCSectionTLSThreadInitSection = nullptr
 Section for thread local data initialization functions. More...
MCSectionCStringSection = nullptr
MCSectionUStringSection = nullptr
MCSectionTextCoalSection = nullptr
MCSectionConstTextCoalSection = nullptr
MCSectionConstDataSection = nullptr
MCSectionDataCoalSection = nullptr
MCSectionConstDataCoalSection = nullptr
MCSectionDataCommonSection = nullptr
MCSectionDataBSSSection = nullptr
MCSectionFourByteConstantSection = nullptr
MCSectionEightByteConstantSection = nullptr
MCSectionSixteenByteConstantSection = nullptr
MCSectionLazySymbolPointerSection = nullptr
MCSectionNonLazySymbolPointerSection = nullptr
MCSectionThreadLocalPointerSection = nullptr
MCSectionDrectveSection = nullptr
 COFF specific sections. More...
MCSectionPDataSection = nullptr
MCSectionXDataSection = nullptr
MCSectionSXDataSection = nullptr
MCSectionGFIDsSection = nullptr
MCSectionGLJMPSection = nullptr
MCSectionTOCBaseSection = nullptr

Detailed Description

Definition at line 188 of file TargetLoweringObjectFileImpl.h.

Constructor & Destructor Documentation

◆ TargetLoweringObjectFileWasm()

llvm::TargetLoweringObjectFileWasm::TargetLoweringObjectFileWasm ( )

◆ ~TargetLoweringObjectFileWasm()

llvm::TargetLoweringObjectFileWasm::~TargetLoweringObjectFileWasm ( )

Member Function Documentation

◆ getExplicitSectionGlobal()

MCSection * TargetLoweringObjectFileWasm::getExplicitSectionGlobal ( const GlobalObject GO,
SectionKind  Kind,
const TargetMachine TM 
) const

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 1841 of file TargetLoweringObjectFileImpl.cpp.

References C, llvm::MCContext::GenericSectionID, llvm::MCObjectFileInfo::getContext(), llvm::SectionKind::getMetadata(), llvm::Value::getName(), llvm::GlobalObject::getSection(), getWasmComdat(), llvm::MCContext::getWasmSection(), Name, llvm::ARMBuildAttrs::Section, and llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal().

◆ getStaticCtorSection()

MCSection * TargetLoweringObjectFileWasm::getStaticCtorSection ( unsigned  Priority,
const MCSymbol KeySym 
) const

◆ getStaticDtorSection()

MCSection * TargetLoweringObjectFileWasm::getStaticDtorSection ( unsigned  Priority,
const MCSymbol KeySym 
) const

Reimplemented from llvm::TargetLoweringObjectFile.

Definition at line 1964 of file TargetLoweringObjectFileImpl.cpp.

References llvm_unreachable.

◆ InitializeWasm()

void TargetLoweringObjectFileWasm::InitializeWasm ( )

◆ lowerRelativeReference()

const MCExpr * TargetLoweringObjectFileWasm::lowerRelativeReference ( const GlobalValue LHS,
const GlobalValue RHS,
const TargetMachine TM 
) const

◆ SelectSectionForGlobal()

MCSection * TargetLoweringObjectFileWasm::SelectSectionForGlobal ( const GlobalObject GO,
SectionKind  Kind,
const TargetMachine TM 
) const

◆ shouldPutJumpTableInFunctionSection()

bool TargetLoweringObjectFileWasm::shouldPutJumpTableInFunctionSection ( bool  UsesLabelDifference,
const Function F 
) const

Reimplemented from llvm::TargetLoweringObjectFile.

Definition at line 1920 of file TargetLoweringObjectFileImpl.cpp.

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