LLVM  15.0.0git
TargetLoweringObjectFileImpl.h
Go to the documentation of this file.
1 //==- llvm/CodeGen/TargetLoweringObjectFileImpl.h - Object Info --*- C++ -*-==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements classes used to handle lowerings specific to common
10 // object file formats.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H
15 #define LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H
16 
17 #include "llvm/ADT/SmallPtrSet.h"
19 #include "llvm/MC/MCExpr.h"
21 
22 namespace llvm {
23 
24 class GlobalValue;
25 class MachineModuleInfo;
26 class MachineFunction;
27 class MCContext;
28 class MCExpr;
29 class MCSection;
30 class MCSymbol;
31 class Module;
32 class TargetMachine;
33 
35  bool UseInitArray = false;
36  mutable unsigned NextUniqueID = 1; // ID 0 is reserved for execute-only sections
38 
39 protected:
42 
43 public:
45  ~TargetLoweringObjectFileELF() override = default;
46 
47  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
48 
49  void getModuleMetadata(Module &M) override;
50 
51  /// Emit Obj-C garbage collection and linker options.
52  void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override;
53 
54  void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &DL,
55  const MCSymbol *Sym) const override;
56 
57  /// Given a constant with the SectionKind, return a section that it should be
58  /// placed in.
60  const Constant *C,
61  Align &Alignment) const override;
62 
64  const TargetMachine &TM) const override;
65 
67  const TargetMachine &TM) const override;
68 
70  const TargetMachine &TM) const override;
71  MCSection *getSectionForLSDA(const Function &F, const MCSymbol &FnSym,
72  const TargetMachine &TM) const override;
73 
74  MCSection *
76  const MachineBasicBlock &MBB,
77  const TargetMachine &TM) const override;
78 
79  MCSection *
81  const TargetMachine &TM) const override;
82 
83  bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
84  const Function &F) const override;
85 
86  /// Return an MCExpr to use for a reference to the specified type info global
87  /// variable from exception handling information.
89  unsigned Encoding,
90  const TargetMachine &TM,
91  MachineModuleInfo *MMI,
92  MCStreamer &Streamer) const override;
93 
94  // The symbol that gets passed to .cfi_personality.
96  const TargetMachine &TM,
97  MachineModuleInfo *MMI) const override;
98 
99  void InitializeELF(bool UseInitArray_);
100  MCSection *getStaticCtorSection(unsigned Priority,
101  const MCSymbol *KeySym) const override;
102  MCSection *getStaticDtorSection(unsigned Priority,
103  const MCSymbol *KeySym) const override;
104 
106  const GlobalValue *RHS,
107  const TargetMachine &TM) const override;
108 
110  const TargetMachine &TM) const override;
111 
112  MCSection *getSectionForCommandLines() const override;
113 };
114 
116 public:
118  ~TargetLoweringObjectFileMachO() override = default;
119 
120  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
121 
122  MCSection *getStaticDtorSection(unsigned Priority,
123  const MCSymbol *KeySym) const override;
124 
125  /// Emit the module flags that specify the garbage collection information.
126  void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override;
127 
129  const TargetMachine &TM) const override;
130 
132  const TargetMachine &TM) const override;
133 
135  const Constant *C,
136  Align &Alignment) const override;
137 
138  /// The mach-o version of this method defaults to returning a stub reference.
139  const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
140  unsigned Encoding,
141  const TargetMachine &TM,
142  MachineModuleInfo *MMI,
143  MCStreamer &Streamer) const override;
144 
145  // The symbol that gets passed to .cfi_personality.
147  const TargetMachine &TM,
148  MachineModuleInfo *MMI) const override;
149 
150  /// Get MachO PC relative GOT entry relocation
152  const MCSymbol *Sym,
153  const MCValue &MV, int64_t Offset,
154  MachineModuleInfo *MMI,
155  MCStreamer &Streamer) const override;
156 
157  void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
158  const TargetMachine &TM) const override;
159 };
160 
162  mutable unsigned NextUniqueID = 0;
163  const TargetMachine *TM = nullptr;
164 
165 public:
166  ~TargetLoweringObjectFileCOFF() override = default;
167 
168  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
170  const TargetMachine &TM) const override;
171 
173  const TargetMachine &TM) const override;
174 
175  void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
176  const TargetMachine &TM) const override;
177 
179  const TargetMachine &TM) const override;
180 
181  /// Emit Obj-C garbage collection and linker options.
182  void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override;
183 
184  MCSection *getStaticCtorSection(unsigned Priority,
185  const MCSymbol *KeySym) const override;
186  MCSection *getStaticDtorSection(unsigned Priority,
187  const MCSymbol *KeySym) const override;
188 
190  const GlobalValue *RHS,
191  const TargetMachine &TM) const override;
192 
193  /// Given a mergeable constant with the specified size and relocation
194  /// information, return a section that it should be placed in.
196  const Constant *C,
197  Align &Alignment) const override;
198 
199 private:
200  void emitLinkerDirectives(MCStreamer &Streamer, Module &M) const;
201 };
202 
204  mutable unsigned NextUniqueID = 0;
205 
206 public:
207  TargetLoweringObjectFileWasm() = default;
208  ~TargetLoweringObjectFileWasm() override = default;
209 
211  const TargetMachine &TM) const override;
212 
214  const TargetMachine &TM) const override;
215 
216  bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
217  const Function &F) const override;
218 
219  void InitializeWasm();
220  MCSection *getStaticCtorSection(unsigned Priority,
221  const MCSymbol *KeySym) const override;
222  MCSection *getStaticDtorSection(unsigned Priority,
223  const MCSymbol *KeySym) const override;
224 
226  const GlobalValue *RHS,
227  const TargetMachine &TM) const override;
228 };
229 
231 public:
232  TargetLoweringObjectFileXCOFF() = default;
233  ~TargetLoweringObjectFileXCOFF() override = default;
234 
235  static bool ShouldEmitEHBlock(const MachineFunction *MF);
236  static bool ShouldSetSSPCanaryBitInTB(const MachineFunction *MF);
237 
238  static MCSymbol *getEHInfoTableSymbol(const MachineFunction *MF);
239 
240  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
241 
242  bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
243  const Function &F) const override;
244 
246  const TargetMachine &TM) const override;
247 
248  MCSection *getStaticCtorSection(unsigned Priority,
249  const MCSymbol *KeySym) const override;
250  MCSection *getStaticDtorSection(unsigned Priority,
251  const MCSymbol *KeySym) const override;
252 
254  const GlobalValue *RHS,
255  const TargetMachine &TM) const override;
256 
258  const TargetMachine &TM) const override;
259 
261  const TargetMachine &TM) const override;
262 
263  /// Given a constant with the SectionKind, return a section that it should be
264  /// placed in.
266  const Constant *C,
267  Align &Alignment) const override;
268 
270 
271  MCSection *
273  const TargetMachine &TM) const override;
275  const TargetMachine &TM) const override;
276 
277  /// For external functions, this will always return a function descriptor
278  /// csect.
279  MCSection *
281  const TargetMachine &TM) const override;
282 
283  /// For functions, this will always return a function descriptor symbol.
285  const TargetMachine &TM) const override;
286 
288  const TargetMachine &TM) const override;
289 
290  /// For functions, this will return the LSDA section. If option
291  /// -ffunction-sections is on, this will return a unique csect with the
292  /// function name appended to .gcc_except_table as a suffix of the LSDA
293  /// section name.
294  MCSection *getSectionForLSDA(const Function &F, const MCSymbol &FnSym,
295  const TargetMachine &TM) const override;
296 };
297 
299 public:
301  ~TargetLoweringObjectFileGOFF() override = default;
302 
304  const TargetMachine &TM) const override;
306  const TargetMachine &TM) const override;
307 };
308 
309 } // end namespace llvm
310 
311 #endif // LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H
llvm::TargetLoweringObjectFileELF::getSectionForLSDA
MCSection * getSectionForLSDA(const Function &F, const MCSymbol &FnSym, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:938
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::TargetLoweringObjectFileELF::~TargetLoweringObjectFileELF
~TargetLoweringObjectFileELF() override=default
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:113
llvm::TargetLoweringObjectFileELF::TargetLoweringObjectFileELF
TargetLoweringObjectFileELF()
Definition: TargetLoweringObjectFileImpl.cpp:111
llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:888
llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel
const MCExpr * getIndirectSymViaGOTPCRel(const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
Get MachO PC relative GOT entry relocation.
Definition: TargetLoweringObjectFileImpl.cpp:1428
llvm::TargetLoweringObjectFileXCOFF::getSectionForTOCEntry
MCSection * getSectionForTOCEntry(const MCSymbol *Sym, const TargetMachine &TM) const override
On targets that support TOC entries, return a section for the entry given the symbol it refers to.
Definition: TargetLoweringObjectFileImpl.cpp:2557
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:74
llvm::Function
Definition: Function.h:60
llvm::TargetLoweringObjectFileELF::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1079
llvm::TargetLoweringObjectFileELF::emitModuleMetadata
void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override
Emit Obj-C garbage collection and linker options.
Definition: TargetLoweringObjectFileImpl.cpp:305
llvm::TargetLoweringObjectFileWasm::~TargetLoweringObjectFileWasm
~TargetLoweringObjectFileWasm() override=default
llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal
MCSection * getExplicitSectionGlobal(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...
Definition: TargetLoweringObjectFileImpl.cpp:817
llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1293
llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal
MCSection * getExplicitSectionGlobal(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...
Definition: TargetLoweringObjectFileImpl.cpp:2069
llvm::TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO
TargetLoweringObjectFileMachO()
Definition: TargetLoweringObjectFileImpl.cpp:1156
llvm::TargetLoweringObjectFileELF::InitializeELF
void InitializeELF(bool UseInitArray_)
Definition: TargetLoweringObjectFileImpl.cpp:1134
llvm::TargetLoweringObjectFileXCOFF::getSectionForJumpTable
MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2419
llvm::TargetLoweringObjectFileXCOFF::getEHInfoTableSymbol
static MCSymbol * getEHInfoTableSymbol(const MachineFunction *MF)
Definition: TargetLoweringObjectFileImpl.cpp:2231
llvm::TargetLoweringObjectFileELF
Definition: TargetLoweringObjectFileImpl.h:34
llvm::TargetLoweringObjectFileGOFF::~TargetLoweringObjectFileGOFF
~TargetLoweringObjectFileGOFF() override=default
llvm::SmallPtrSet
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Definition: SmallPtrSet.h:450
llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference
MCSection * getSectionForExternalReference(const GlobalObject *GO, const TargetMachine &TM) const override
For external functions, this will always return a function descriptor csect.
Definition: TargetLoweringObjectFileImpl.cpp:2303
RHS
Value * RHS
Definition: X86PartialReduction.cpp:76
llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference
const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
The mach-o version of this method defaults to returning a stub reference.
Definition: TargetLoweringObjectFileImpl.cpp:1380
llvm::TargetLoweringObjectFileXCOFF::ShouldEmitEHBlock
static bool ShouldEmitEHBlock(const MachineFunction *MF)
Definition: TargetLoweringObjectFileImpl.cpp:2201
llvm::TargetLoweringObjectFileMachO
Definition: TargetLoweringObjectFileImpl.h:115
llvm::TargetLoweringObjectFileELF::getSectionForJumpTable
MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:923
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::TargetLoweringObjectFile
Definition: TargetLoweringObjectFile.h:45
llvm::TargetLoweringObjectFileCOFF::getNameWithPrefix
void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1726
llvm::TargetLoweringObjectFileXCOFF::Initialize
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Definition: TargetLoweringObjectFileImpl.cpp:2462
XCOFF.h
llvm::TargetLoweringObjectFileXCOFF::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2474
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:201
LHS
Value * LHS
Definition: X86PartialReduction.cpp:75
llvm::TargetLoweringObjectFileMachO::getSectionForConstant
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
Definition: TargetLoweringObjectFileImpl.cpp:1363
llvm::TargetLoweringObjectFileELF::shouldPutJumpTableInFunctionSection
bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const override
Definition: TargetLoweringObjectFileImpl.cpp:973
llvm::TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal
MCSection * getExplicitSectionGlobal(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...
Definition: TargetLoweringObjectFileImpl.cpp:2273
llvm::TargetLoweringObjectFileELF::PLTRelativeVariantKind
MCSymbolRefExpr::VariantKind PLTRelativeVariantKind
Definition: TargetLoweringObjectFileImpl.h:40
llvm::TargetLoweringObjectFileWasm::InitializeWasm
void InitializeWasm()
Definition: TargetLoweringObjectFileImpl.cpp:2176
llvm::TargetLoweringObjectFileWasm::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2185
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::TargetLoweringObjectFileELF::lowerRelativeReference
const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1091
llvm::TargetLoweringObjectFileXCOFF::TargetLoweringObjectFileXCOFF
TargetLoweringObjectFileXCOFF()=default
llvm::GlobalObject
Definition: GlobalObject.h:27
llvm::TargetLoweringObjectFileXCOFF::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2479
llvm::TargetLoweringObjectFileELF::getModuleMetadata
void getModuleMetadata(Module &M) override
Get the module-level metadata that the platform cares about.
Definition: TargetLoweringObjectFileImpl.cpp:297
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition: MachineModuleInfo.h:75
llvm::TargetLoweringObjectFileMachO::getNameWithPrefix
void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1517
llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2322
SmallPtrSet.h
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::TargetLoweringObjectFileXCOFF::getSectionForConstant
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
Definition: TargetLoweringObjectFileImpl.cpp:2442
llvm::TargetLoweringObjectFileXCOFF::getSectionForFunctionDescriptor
MCSection * getSectionForFunctionDescriptor(const Function *F, const TargetMachine &TM) const override
On targets that use separate function descriptor symbols, return a section for the descriptor given i...
Definition: TargetLoweringObjectFileImpl.cpp:2548
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:94
llvm::TargetLoweringObjectFileCOFF::~TargetLoweringObjectFileCOFF
~TargetLoweringObjectFileCOFF() override=default
llvm::TargetLoweringObjectFileELF::emitPersonalityValue
void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym) const override
Definition: TargetLoweringObjectFileImpl.cpp:390
llvm::TargetLoweringObjectFileMachO::~TargetLoweringObjectFileMachO
~TargetLoweringObjectFileMachO() override=default
llvm::TargetLoweringObjectFile::TM
const TargetMachine * TM
Definition: TargetLoweringObjectFile.h:68
llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata
void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override
Emit Obj-C garbage collection and linker options.
Definition: TargetLoweringObjectFileImpl.cpp:1765
llvm::XCOFF::StorageClass
StorageClass
Definition: XCOFF.h:154
llvm::TargetLoweringObjectFileWasm::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2193
llvm::GlobalValue
Definition: GlobalValue.h:44
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
llvm::MCSymbolRefExpr::VariantKind
VariantKind
Definition: MCExpr.h:194
llvm::TargetLoweringObjectFileWasm::shouldPutJumpTableInFunctionSection
bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const override
Definition: TargetLoweringObjectFileImpl.cpp:2149
llvm::TargetLoweringObjectFileMachO::Initialize
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Definition: TargetLoweringObjectFileImpl.cpp:1160
llvm::TargetLoweringObjectFileXCOFF::getTargetSymbol
MCSymbol * getTargetSymbol(const GlobalValue *GV, const TargetMachine &TM) const override
For functions, this will always return a function descriptor symbol.
Definition: TargetLoweringObjectFileImpl.cpp:2237
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:77
llvm::TargetLoweringObjectFileGOFF::getExplicitSectionGlobal
MCSection * getExplicitSectionGlobal(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...
Definition: TargetLoweringObjectFileImpl.cpp:2587
llvm::TargetLoweringObjectFileMachO::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1184
llvm::TargetLoweringObjectFileMachO::emitModuleMetadata
void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override
Emit the module flags that specify the garbage collection information.
Definition: TargetLoweringObjectFileImpl.cpp:1193
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
llvm::TargetLoweringObjectFileELF::getSectionForConstant
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
Definition: TargetLoweringObjectFileImpl.cpp:982
llvm::TargetLoweringObjectFileELF::lowerDSOLocalEquivalent
const MCExpr * lowerDSOLocalEquivalent(const DSOLocalEquivalent *Equiv, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1111
llvm::TargetLoweringObjectFileXCOFF::~TargetLoweringObjectFileXCOFF
~TargetLoweringObjectFileXCOFF() override=default
llvm::TargetLoweringObjectFileWasm
Definition: TargetLoweringObjectFileImpl.h:203
llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2130
llvm::MachineFunction
Definition: MachineFunction.h:241
llvm::TargetLoweringObjectFileCOFF::Initialize
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Definition: TargetLoweringObjectFileImpl.cpp:1851
llvm::TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol
MCSymbol * getFunctionEntryPointSymbol(const GlobalValue *Func, const TargetMachine &TM) const override
If supported, return the function entry point symbol.
Definition: TargetLoweringObjectFileImpl.cpp:2516
llvm::TargetLoweringObjectFileELF::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1085
llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol
MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
Definition: TargetLoweringObjectFileImpl.cpp:378
TargetLoweringObjectFile.h
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::TargetLoweringObjectFileELF::getUniqueSectionForFunction
MCSection * getUniqueSectionForFunction(const Function &F, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:907
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol
MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
Definition: TargetLoweringObjectFileImpl.cpp:1408
llvm::SectionKind
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:22
llvm::TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF
TargetLoweringObjectFileGOFF()
llvm::TargetLoweringObjectFileXCOFF::ShouldSetSSPCanaryBitInTB
static bool ShouldSetSSPCanaryBitInTB(const MachineFunction *MF)
Definition: TargetLoweringObjectFileImpl.cpp:2219
llvm::TargetLoweringObjectFileELF::getSectionForCommandLines
MCSection * getSectionForCommandLines() const override
If supported, return the section to use for the llvm.commandline metadata.
Definition: TargetLoweringObjectFileImpl.cpp:1125
llvm::TargetLoweringObjectFileWasm::TargetLoweringObjectFileWasm
TargetLoweringObjectFileWasm()=default
llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal
MCSection * getExplicitSectionGlobal(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...
Definition: TargetLoweringObjectFileImpl.cpp:1246
llvm::TargetLoweringObjectFileELF::Initialize
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Definition: TargetLoweringObjectFileImpl.cpp:115
llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal
MCSection * getExplicitSectionGlobal(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...
Definition: TargetLoweringObjectFileImpl.cpp:1616
llvm::TargetLoweringObjectFileXCOFF
Definition: TargetLoweringObjectFileImpl.h:230
llvm::TargetLoweringObjectFileXCOFF::getStorageClassForGlobal
static XCOFF::StorageClass getStorageClassForGlobal(const GlobalValue *GV)
Definition: TargetLoweringObjectFileImpl.cpp:2492
llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1655
llvm::TargetLoweringObjectFileXCOFF::lowerRelativeReference
const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2484
llvm::TargetLoweringObjectFileGOFF
Definition: TargetLoweringObjectFileImpl.h:298
llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock
MCSection * getSectionForMachineBasicBlock(const Function &F, const MachineBasicBlock &MBB, const TargetMachine &TM) const override
Returns a unique section for the given machine basic block.
Definition: TargetLoweringObjectFileImpl.cpp:1001
llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference
const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
Return an MCExpr to use for a reference to the specified type info global variable from exception han...
Definition: TargetLoweringObjectFileImpl.cpp:412
llvm::TargetLoweringObjectFileWasm::lowerRelativeReference
const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2156
llvm::SmallVectorImpl< char >
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
llvm::MCValue
This represents an "assembler immediate".
Definition: MCValue.h:36
llvm::MCSymbolRefExpr::VK_None
@ VK_None
Definition: MCExpr.h:195
llvm::TargetLoweringObjectFileCOFF::getSectionForConstant
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a mergeable constant with the specified size and relocation information, return a section that ...
Definition: TargetLoweringObjectFileImpl.cpp:1992
llvm::TargetLoweringObjectFileGOFF::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2592
llvm::TargetLoweringObjectFileXCOFF::getSectionForLSDA
MCSection * getSectionForLSDA(const Function &F, const MCSymbol &FnSym, const TargetMachine &TM) const override
For functions, this will return the LSDA section.
Definition: TargetLoweringObjectFileImpl.cpp:2568
llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable
MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1738
llvm::TargetLoweringObjectFileCOFF::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1915
llvm::TargetLoweringObjectFileCOFF::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1922
MCExpr.h
llvm::DSOLocalEquivalent
Wrapper for a function that represents a value that functionally represents the original function.
Definition: Constants.h:894
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::TargetLoweringObjectFileXCOFF::shouldPutJumpTableInFunctionSection
bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const override
Definition: TargetLoweringObjectFileImpl.cpp:2435
llvm::TargetLoweringObjectFileCOFF
Definition: TargetLoweringObjectFileImpl.h:161
llvm::ISD::MCSymbol
@ MCSymbol
Definition: ISDOpcodes.h:172
llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference
const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1929