LLVM: include/llvm/Target/TargetLoweringObjectFile.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H
15#define LLVM_TARGET_TARGETLOWERINGOBJECTFILE_H
16
20#include
21
22namespace llvm {
23
46
48
50
51protected:
56
57
58
63
64
66
67
69
71
72public:
78
80
81
82
83
85
89
90
92
93
94 void emitCGProfileMetadata(MCStreamer &Streamer, Module &M) const;
95
96
97 void emitPseudoProbeDescMetadata(MCStreamer &Streamer, Module &M,
98 std::function<void(MCStreamer &Streamer)>
99 COMDATSymEmitter = nullptr) const;
100
101
103
104
106
107
108
111 Align &Alignment) const;
112
113
114
117 Align &Alignment,
119
121 getSectionForMachineBasicBlock(const Function &F,
124
126 getUniqueSectionForFunction(const Function &F,
128
129
130
133
134
135
136
139
140
141
142
145
149
155
160
161 virtual bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
163
164
165
166
170
171
172
174 unsigned Encoding,
178
179
180
184
185
189
193 unsigned getCallSiteEncoding() const;
194
197
199 const MCSymbol *KeySym) const {
201 }
202
204 const MCSymbol *KeySym) const {
206 }
207
208
209
210 virtual const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const;
211
214 std::optional<int64_t> PCRelativeOffset, const TargetMachine &TM) const {
215 return nullptr;
216 }
217
218
219
221
224 std::optional<int64_t> PCRelativeOffset, const TargetMachine &TM) const {
225 return nullptr;
226 }
227
228
229
233
234
235
239
240
244
245
247
248
250 return nullptr;
251 }
252
253
260 return nullptr;
261 }
262
263
264
266 return nullptr;
267 }
268
269
270
274 return nullptr;
275 }
276
277
278
279
282 return nullptr;
283 }
284
285
286
290 return nullptr;
291 }
292
293
294
297 return nullptr;
298 }
299
300
301
302
305 return nullptr;
306 }
307
308protected:
312};
313
314}
315
316#endif
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This is an important base class in LLVM.
Wrapper for a function that represents a value that functionally represents the original function.
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.
MCSection * LSDASection
If exception handling is supported by the target, this is the section the Language Specific Data Area...
Wrapper class representing physical registers. Should be passed by value.
static constexpr unsigned NoRegister
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.
MCSection * StaticDtorSection
This section contains the static destructor pointer list.
Definition TargetLoweringObjectFile.h:68
virtual const MCExpr * lowerDSOLocalEquivalent(const MCSymbol *LHS, const MCSymbol *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
Definition TargetLoweringObjectFile.h:222
virtual MCRegister getStaticBase() const
Returns the register used as static base in RWPI variants.
Definition TargetLoweringObjectFile.h:246
virtual MCSection * getSectionForCommandLines() const
If supported, return the section to use for the llvm.commandline metadata.
Definition TargetLoweringObjectFile.h:265
unsigned PersonalityEncoding
PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH.
Definition TargetLoweringObjectFile.h:59
bool SupportGOTPCRelWithOffset
Definition TargetLoweringObjectFile.h:53
Mangler & getMangler() const
Definition TargetLoweringObjectFile.h:79
bool SupportIndirectSymViaGOTPCRel
Definition TargetLoweringObjectFile.h:52
virtual MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const
Definition TargetLoweringObjectFile.h:203
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.
Definition TargetLoweringObjectFile.h:254
bool SupportDebugThreadLocalLocation
Definition TargetLoweringObjectFile.h:54
TargetLoweringObjectFile & operator=(const TargetLoweringObjectFile &)=delete
virtual void emitModuleMetadata(MCStreamer &Streamer, Module &M) const
Emit the module-level metadata that the platform cares about.
Definition TargetLoweringObjectFile.h:91
const TargetMachine * TM
Definition TargetLoweringObjectFile.h:70
unsigned getLSDAEncoding() const
Definition TargetLoweringObjectFile.h:191
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...
Definition TargetLoweringObjectFile.h:288
virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
unsigned LSDAEncoding
Definition TargetLoweringObjectFile.h:60
bool hasPLTPCRelative() const
Target supports a PC-relative relocation that references the PLT of a function.
Definition TargetLoweringObjectFile.h:220
unsigned getTTypeEncoding() const
Definition TargetLoweringObjectFile.h:192
virtual void getModuleMetadata(Module &M)
Get the module-level metadata that the platform cares about.
Definition TargetLoweringObjectFile.h:105
unsigned getPersonalityEncoding() const
Definition TargetLoweringObjectFile.h:190
bool supportDebugThreadLocalLocation() const
Target supports TLS offset relocation in debug section?
Definition TargetLoweringObjectFile.h:241
MCSection * StaticCtorSection
This section contains the static constructor pointer list.
Definition TargetLoweringObjectFile.h:65
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.
Definition TargetLoweringObjectFile.h:249
virtual const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, int64_t Addend, std::optional< int64_t > PCRelativeOffset, const TargetMachine &TM) const
Definition TargetLoweringObjectFile.h:212
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...
virtual MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const
Definition TargetLoweringObjectFile.h:198
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.
Definition TargetLoweringObjectFile.h:280
bool supportGOTPCRelWithOffset() const
Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset?
Definition TargetLoweringObjectFile.h:236
uint32_t PLTPCRelativeSpecifier
Definition TargetLoweringObjectFile.h:55
virtual MCSection * getSectionForLSDA(const Function &, const MCSymbol &, const TargetMachine &) const
Definition TargetLoweringObjectFile.h:156
bool supportIndirectSymViaGOTPCRel() const
Target supports replacing a data "PC"-relative access to a symbol through another symbol,...
Definition TargetLoweringObjectFile.h:230
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...
unsigned TTypeEncoding
Definition TargetLoweringObjectFile.h:61
unsigned CallSiteEncoding
Definition TargetLoweringObjectFile.h:62
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.
Definition TargetLoweringObjectFile.h:303
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...
Definition TargetLoweringObjectFile.h:272
virtual void emitLinkerDirectives(MCStreamer &Streamer, Module &M) const
Process linker options metadata and emit platform-specific bits.
Definition TargetLoweringObjectFile.h:102
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 ...
Definition TargetLoweringObjectFile.h:295
Primary interface to the complete machine description for the target machine.
@ C
The default llvm calling convention, compatible with C.
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.