14#ifndef LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H
15#define LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H
25struct MachineJumpTableEntry;
31class MachineBasicBlock;
32class MachineModuleInfo;
45class DSOLocalEquivalent;
52 bool SupportIndirectSymViaGOTPCRel =
false;
53 bool SupportGOTPCRelWithOffset =
true;
54 bool SupportDebugThreadLocalLocation =
true;
59 unsigned PersonalityEncoding = 0;
60 unsigned LSDAEncoding = 0;
61 unsigned TTypeEncoding = 0;
62 unsigned CallSiteEncoding = 0;
109 Align &Alignment)
const;
119 getSectionForMachineBasicBlock(
const Function &
F,
124 getUniqueSectionForFunction(
const Function &
F,
159 virtual bool shouldPutJumpTableInFunctionSection(
bool UsesLabelDifference,
191 unsigned getCallSiteEncoding()
const;
198 return StaticCtorSection;
203 return StaticDtorSection;
212 std::optional<int64_t> PCRelativeOffset,
const TargetMachine &TM)
const {
222 std::optional<int64_t> PCRelativeOffset,
const TargetMachine &TM)
const {
229 return SupportIndirectSymViaGOTPCRel;
235 return SupportGOTPCRelWithOffset;
240 return SupportDebugThreadLocalLocation;
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
Machine Check Debug Module
This is an important base class in LLVM.
A parsed version of the target data layout string in and methods for querying it.
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
Wrapper class representing physical registers. Should be passed by value.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Streaming machine code generation interface.
Represent a reference to a symbol from inside an expression.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This class contains meta information specific to a module.
A Module instance is used to store all the information related to an LLVM module.
SectionKind - This is a simple POD value that classifies the properties of a section.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
virtual const MCExpr * lowerDSOLocalEquivalent(const MCSymbol *LHS, const MCSymbol *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
virtual MCRegister getStaticBase() const
Returns the register used as static base in RWPI variants.
virtual MCSection * getSectionForCommandLines() const
If supported, return the section to use for the llvm.commandline metadata.
Mangler & getMangler() const
virtual MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) 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.
TargetLoweringObjectFile & operator=(const TargetLoweringObjectFile &)=delete
virtual void emitModuleMetadata(MCStreamer &Streamer, Module &M) const
Emit the module-level metadata that the platform cares about.
unsigned getLSDAEncoding() const
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...
bool hasPLTPCRelative() const
Target supports a PC-relative relocation that references the PLT of a function.
unsigned getTTypeEncoding() const
virtual void getModuleMetadata(Module &M)
Get the module-level metadata that the platform cares about.
unsigned getPersonalityEncoding() const
bool supportDebugThreadLocalLocation() const
Target supports TLS offset relocation in debug section?
virtual MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const =0
virtual const MCExpr * getIndirectSymViaRWPI(const MCSymbol *Sym) const
Get the target specific RWPI relocation.
virtual const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
virtual MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const
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.
bool supportGOTPCRelWithOffset() const
Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
virtual MCSection * getSectionForLSDA(const Function &, const MCSymbol &, const TargetMachine &) const
bool supportIndirectSymViaGOTPCRel() const
Target supports replacing a data "PC"-relative access to a symbol through another symbol,...
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...
TargetLoweringObjectFile()=default
virtual MCSymbol * getFunctionEntryPointSymbol(const GlobalValue *Func, const TargetMachine &TM) const
If supported, return the function entry point symbol.
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...
virtual void emitLinkerDirectives(MCStreamer &Streamer, Module &M) const
Process linker options metadata and emit platform-specific bits.
TargetLoweringObjectFile(const TargetLoweringObjectFile &)=delete
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 ...
Primary interface to the complete machine description for the target machine.
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.
MachineJumpTableEntry - One jump table in the jump table info.