Go to the documentation of this file.
14 #ifndef LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H
15 #define LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H
29 class MachineBasicBlock;
30 class MachineModuleInfo;
36 class MCSymbolRefExpr;
43 class DSOLocalEquivalent;
100 Align &Alignment)
const;
295 #endif // LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H
virtual MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const
MCSection * StaticDtorSection
This section contains the static destructor pointer list.
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A parsed version of the target data layout string in and methods for querying it.
virtual void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const
Context object for machine code objects.
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 suffi...
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 defini...
virtual const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) 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.
virtual const MCExpr * getIndirectSymViaRWPI(const MCSymbol *Sym) const
Get the target specific RWPI relocation.
virtual MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const
static constexpr unsigned NoRegister
MCSection * StaticCtorSection
This section contains the static constructor pointer list.
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 ...
unsigned CallSiteEncoding
Streaming machine code generation interface.
virtual const MCExpr * lowerDSOLocalEquivalent(const DSOLocalEquivalent *Equiv, const TargetMachine &TM) const
MCSection * LSDASection
If exception handling is supported by the target, this is the section the Language Specific Data Area...
virtual MCSection * getSectionForCommandLines() const
If supported, return the section to use for the llvm.commandline metadata.
unsigned getTTypeEncoding() const
TargetLoweringObjectFile & operator=(const TargetLoweringObjectFile &)=delete
(vector float) vec_cmpeq(*A, *B) C
bool SupportDebugThreadLocalLocation
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 ext...
This class contains meta information specific to a module.
void emitCGProfileMetadata(MCStreamer &Streamer, Module &M) const
Emit Call Graph Profile metadata.
virtual void Initialize(MCContext &ctx, const TargetMachine &TM)
This method must be called before any actual lowering is done.
virtual void getModuleMetadata(Module &M)
Get the module-level metadata that the platform cares about.
This struct is a compact representation of a valid (non-zero power of two) alignment.
virtual MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const
static SectionKind getKindForGlobal(const GlobalObject *GO, const TargetMachine &TM)
Classify the specified global variable into a set of target independent categories embodied in Sectio...
virtual MCSymbol * getFunctionEntryPointSymbol(const GlobalValue *Func, const TargetMachine &TM) const
If supported, return the function entry point symbol.
virtual void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const
virtual MCSection * getSectionForLSDA(const Function &, const MCSymbol &, const TargetMachine &) const
unsigned getCallSiteEncoding() const
bool SupportIndirectSymViaGOTPCRel
This is an important base class in LLVM.
bool supportGOTPCRelWithOffset() const
Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
virtual MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0
unsigned getPersonalityEncoding() const
bool supportIndirectSymViaGOTPCRel() const
Target supports replacing a data "PC"-relative access to a symbol through another symbol,...
bool supportDebugThreadLocalLocation() const
Target supports TLS offset relocation in debug section?
const MCExpr * getTTypeReference(const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
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.
Primary interface to the complete machine description for the target machine.
bool supportDSOLocalEquivalentLowering() const
Target supports a native lowering of a dso_local_equivalent constant without needing to replace it wi...
A Module instance is used to store all the information related to an LLVM module.
Represent a reference to a symbol from inside an expression.
virtual bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const
virtual ~TargetLoweringObjectFile()
Mangler & getMangler() const
unsigned getLSDAEncoding() const
StringRef - Represent a constant reference to a string, i.e.
TargetLoweringObjectFile()=default
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Instances of this class represent a uniqued identifier for a section in the current translation unit.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Machine Check Debug Module
virtual MCSection * getSectionForMachineBasicBlock(const Function &F, const MachineBasicBlock &MBB, const TargetMachine &TM) const
virtual void emitModuleMetadata(MCStreamer &Streamer, Module &M) const
Emit the module-level metadata that the platform cares about.
virtual MCRegister getStaticBase() const
Returns the register used as static base in RWPI variants.
unsigned PersonalityEncoding
PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.
virtual MCSection * getUniqueSectionForFunction(const Function &F, const TargetMachine &TM) const
SectionKind - This is a simple POD value that classifies the properties of a section.
virtual MCSection * getSectionForConstant(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.
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 * getSectionForFunctionDescriptor(const Function *F, const TargetMachine &TM) const
On targets that use separate function descriptor symbols, return a section for the descriptor given i...
bool SupportGOTPCRelWithOffset
virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
This represents an "assembler immediate".
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...
bool SupportDSOLocalEquivalentLowering
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 info...
Wrapper for a function that represents a value that functionally represents the original function.
Base class for the full range of assembler expressions which are needed for parsing.
Wrapper class representing physical registers. Should be passed by value.