LLVM  14.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"
20 
21 namespace llvm {
22 
23 class GlobalValue;
24 class MachineModuleInfo;
25 class MachineFunction;
26 class MCContext;
27 class MCExpr;
28 class MCSection;
29 class MCSymbol;
30 class Module;
31 class TargetMachine;
32 
34  bool UseInitArray = false;
35  mutable unsigned NextUniqueID = 1; // ID 0 is reserved for execute-only sections
37 
38 protected:
41 
42 public:
44  ~TargetLoweringObjectFileELF() override = default;
45 
46  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
47 
48  void getModuleMetadata(Module &M) override;
49 
50  /// Emit Obj-C garbage collection and linker options.
51  void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override;
52 
53  void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &DL,
54  const MCSymbol *Sym) const override;
55 
56  /// Given a constant with the SectionKind, return a section that it should be
57  /// placed in.
59  const Constant *C,
60  Align &Alignment) const override;
61 
63  const TargetMachine &TM) const override;
64 
66  const TargetMachine &TM) const override;
67 
69  const TargetMachine &TM) const override;
70  MCSection *getSectionForLSDA(const Function &F, const MCSymbol &FnSym,
71  const TargetMachine &TM) const override;
72 
73  MCSection *
75  const MachineBasicBlock &MBB,
76  const TargetMachine &TM) const override;
77 
78  MCSection *
80  const TargetMachine &TM) const override;
81 
82  bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
83  const Function &F) const override;
84 
85  /// Return an MCExpr to use for a reference to the specified type info global
86  /// variable from exception handling information.
88  unsigned Encoding,
89  const TargetMachine &TM,
90  MachineModuleInfo *MMI,
91  MCStreamer &Streamer) const override;
92 
93  // The symbol that gets passed to .cfi_personality.
95  const TargetMachine &TM,
96  MachineModuleInfo *MMI) const override;
97 
98  void InitializeELF(bool UseInitArray_);
99  MCSection *getStaticCtorSection(unsigned Priority,
100  const MCSymbol *KeySym) const override;
101  MCSection *getStaticDtorSection(unsigned Priority,
102  const MCSymbol *KeySym) const override;
103 
104  const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
105  const GlobalValue *RHS,
106  const TargetMachine &TM) const override;
107 
109  const TargetMachine &TM) const override;
110 
111  MCSection *getSectionForCommandLines() const override;
112 };
113 
115 public:
117  ~TargetLoweringObjectFileMachO() override = default;
118 
119  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
120 
121  /// Emit the module flags that specify the garbage collection information.
122  void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override;
123 
125  const TargetMachine &TM) const override;
126 
128  const TargetMachine &TM) const override;
129 
131  const Constant *C,
132  Align &Alignment) const override;
133 
134  /// The mach-o version of this method defaults to returning a stub reference.
135  const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
136  unsigned Encoding,
137  const TargetMachine &TM,
138  MachineModuleInfo *MMI,
139  MCStreamer &Streamer) const override;
140 
141  // The symbol that gets passed to .cfi_personality.
143  const TargetMachine &TM,
144  MachineModuleInfo *MMI) const override;
145 
146  /// Get MachO PC relative GOT entry relocation
148  const MCSymbol *Sym,
149  const MCValue &MV, int64_t Offset,
150  MachineModuleInfo *MMI,
151  MCStreamer &Streamer) const override;
152 
153  void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
154  const TargetMachine &TM) const override;
155 };
156 
158  mutable unsigned NextUniqueID = 0;
159  const TargetMachine *TM = nullptr;
160 
161 public:
162  ~TargetLoweringObjectFileCOFF() override = default;
163 
164  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
166  const TargetMachine &TM) const override;
167 
169  const TargetMachine &TM) const override;
170 
171  void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
172  const TargetMachine &TM) const override;
173 
175  const TargetMachine &TM) const override;
176 
177  /// Emit Obj-C garbage collection and linker options.
178  void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override;
179 
180  MCSection *getStaticCtorSection(unsigned Priority,
181  const MCSymbol *KeySym) const override;
182  MCSection *getStaticDtorSection(unsigned Priority,
183  const MCSymbol *KeySym) const override;
184 
185  const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
186  const GlobalValue *RHS,
187  const TargetMachine &TM) const override;
188 
189  /// Given a mergeable constant with the specified size and relocation
190  /// information, return a section that it should be placed in.
192  const Constant *C,
193  Align &Alignment) const override;
194 
195 private:
196  void emitLinkerDirectives(MCStreamer &Streamer, Module &M) const;
197 };
198 
200  mutable unsigned NextUniqueID = 0;
201 
202 public:
203  TargetLoweringObjectFileWasm() = default;
204  ~TargetLoweringObjectFileWasm() override = default;
205 
207  const TargetMachine &TM) const override;
208 
210  const TargetMachine &TM) const override;
211 
212  bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
213  const Function &F) const override;
214 
215  void InitializeWasm();
216  MCSection *getStaticCtorSection(unsigned Priority,
217  const MCSymbol *KeySym) const override;
218  MCSection *getStaticDtorSection(unsigned Priority,
219  const MCSymbol *KeySym) const override;
220 
221  const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
222  const GlobalValue *RHS,
223  const TargetMachine &TM) const override;
224 };
225 
227 public:
228  TargetLoweringObjectFileXCOFF() = default;
229  ~TargetLoweringObjectFileXCOFF() override = default;
230 
231  static bool ShouldEmitEHBlock(const MachineFunction *MF);
232  static bool ShouldSetSSPCanaryBitInTB(const MachineFunction *MF);
233 
234  static MCSymbol *getEHInfoTableSymbol(const MachineFunction *MF);
235 
236  void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
237 
238  bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference,
239  const Function &F) const override;
240 
242  const TargetMachine &TM) const override;
243 
244  MCSection *getStaticCtorSection(unsigned Priority,
245  const MCSymbol *KeySym) const override;
246  MCSection *getStaticDtorSection(unsigned Priority,
247  const MCSymbol *KeySym) const override;
248 
249  const MCExpr *lowerRelativeReference(const GlobalValue *LHS,
250  const GlobalValue *RHS,
251  const TargetMachine &TM) const override;
252 
254  const TargetMachine &TM) const override;
255 
257  const TargetMachine &TM) const override;
258 
259  /// Given a constant with the SectionKind, return a section that it should be
260  /// placed in.
262  const Constant *C,
263  Align &Alignment) const override;
264 
266 
267  MCSection *
269  const TargetMachine &TM) const override;
271  const TargetMachine &TM) const override;
272 
273  /// For external functions, this will always return a function descriptor
274  /// csect.
275  MCSection *
277  const TargetMachine &TM) const override;
278 
279  /// For functions, this will always return a function descriptor symbol.
281  const TargetMachine &TM) const override;
282 
284  const TargetMachine &TM) const override;
285 };
286 
288 public:
290  ~TargetLoweringObjectFileGOFF() override = default;
291 
293  const TargetMachine &TM) const override;
295  const TargetMachine &TM) const override;
296 };
297 
298 } // end namespace llvm
299 
300 #endif // LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H
llvm::TargetLoweringObjectFileELF::getSectionForLSDA
MCSection * getSectionForLSDA(const Function &F, const MCSymbol &FnSym, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:924
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
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:874
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:1405
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:2532
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:72
llvm::Function
Definition: Function.h:62
llvm::TargetLoweringObjectFileELF::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1065
llvm::TargetLoweringObjectFileELF::emitModuleMetadata
void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override
Emit Obj-C garbage collection and linker options.
Definition: TargetLoweringObjectFileImpl.cpp:306
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:806
llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1270
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:2043
llvm::TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO
TargetLoweringObjectFileMachO()
Definition: TargetLoweringObjectFileImpl.cpp:1142
llvm::TargetLoweringObjectFileELF::InitializeELF
void InitializeELF(bool UseInitArray_)
Definition: TargetLoweringObjectFileImpl.cpp:1120
llvm::TargetLoweringObjectFileXCOFF::getSectionForJumpTable
MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2394
llvm::TargetLoweringObjectFileXCOFF::getEHInfoTableSymbol
static MCSymbol * getEHInfoTableSymbol(const MachineFunction *MF)
Definition: TargetLoweringObjectFileImpl.cpp:2206
llvm::TargetLoweringObjectFileELF
Definition: TargetLoweringObjectFileImpl.h:33
llvm::TargetLoweringObjectFileGOFF::~TargetLoweringObjectFileGOFF
~TargetLoweringObjectFileGOFF() override=default
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::SmallPtrSet
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Definition: SmallPtrSet.h:449
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:2278
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:1357
llvm::TargetLoweringObjectFileXCOFF::ShouldEmitEHBlock
static bool ShouldEmitEHBlock(const MachineFunction *MF)
Definition: TargetLoweringObjectFileImpl.cpp:2176
llvm::TargetLoweringObjectFileMachO
Definition: TargetLoweringObjectFileImpl.h:114
llvm::TargetLoweringObjectFileELF::getSectionForJumpTable
MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:909
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::TargetLoweringObjectFile
Definition: TargetLoweringObjectFile.h:44
llvm::TargetLoweringObjectFileCOFF::getNameWithPrefix
void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1700
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:2437
XCOFF.h
llvm::TargetLoweringObjectFileXCOFF::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2449
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:199
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:1340
llvm::TargetLoweringObjectFileELF::shouldPutJumpTableInFunctionSection
bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, const Function &F) const override
Definition: TargetLoweringObjectFileImpl.cpp:959
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:2248
llvm::TargetLoweringObjectFileELF::PLTRelativeVariantKind
MCSymbolRefExpr::VariantKind PLTRelativeVariantKind
Definition: TargetLoweringObjectFileImpl.h:39
llvm::TargetLoweringObjectFileWasm::InitializeWasm
void InitializeWasm()
Definition: TargetLoweringObjectFileImpl.cpp:2150
llvm::TargetLoweringObjectFileWasm::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2159
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:1077
llvm::TargetLoweringObjectFileXCOFF::TargetLoweringObjectFileXCOFF
TargetLoweringObjectFileXCOFF()=default
llvm::GlobalObject
Definition: GlobalObject.h:28
llvm::TargetLoweringObjectFileXCOFF::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2454
llvm::TargetLoweringObjectFileELF::getModuleMetadata
void getModuleMetadata(Module &M) override
Get the module-level metadata that the platform cares about.
Definition: TargetLoweringObjectFileImpl.cpp:298
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition: MachineModuleInfo.h:78
llvm::TargetLoweringObjectFileMachO::getNameWithPrefix
void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1494
llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2297
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:2417
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:2523
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
llvm::TargetLoweringObjectFileCOFF::~TargetLoweringObjectFileCOFF
~TargetLoweringObjectFileCOFF() override=default
llvm::TargetLoweringObjectFileELF::emitPersonalityValue
void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &DL, const MCSymbol *Sym) const override
Definition: TargetLoweringObjectFileImpl.cpp:391
llvm::TargetLoweringObjectFileMachO::~TargetLoweringObjectFileMachO
~TargetLoweringObjectFileMachO() override=default
llvm::TargetLoweringObjectFile::TM
const TargetMachine * TM
Definition: TargetLoweringObjectFile.h:67
llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata
void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override
Emit Obj-C garbage collection and linker options.
Definition: TargetLoweringObjectFileImpl.cpp:1739
llvm::XCOFF::StorageClass
StorageClass
Definition: XCOFF.h:113
llvm::TargetLoweringObjectFileWasm::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:2167
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:2123
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:1147
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:2212
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:79
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:2549
llvm::TargetLoweringObjectFileMachO::emitModuleMetadata
void emitModuleMetadata(MCStreamer &Streamer, Module &M) const override
Emit the module flags that specify the garbage collection information.
Definition: TargetLoweringObjectFileImpl.cpp:1171
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
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:968
llvm::TargetLoweringObjectFileELF::lowerDSOLocalEquivalent
const MCExpr * lowerDSOLocalEquivalent(const DSOLocalEquivalent *Equiv, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1097
llvm::TargetLoweringObjectFileXCOFF::~TargetLoweringObjectFileXCOFF
~TargetLoweringObjectFileXCOFF() override=default
llvm::TargetLoweringObjectFileWasm
Definition: TargetLoweringObjectFileImpl.h:199
llvm::TargetLoweringObjectFileWasm::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2104
llvm::MachineFunction
Definition: MachineFunction.h:234
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:1825
llvm::TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol
MCSymbol * getFunctionEntryPointSymbol(const GlobalValue *Func, const TargetMachine &TM) const override
If supported, return the function entry point symbol.
Definition: TargetLoweringObjectFileImpl.cpp:2491
llvm::TargetLoweringObjectFileELF::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1071
llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol
MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
Definition: TargetLoweringObjectFileImpl.cpp:379
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:893
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:1385
llvm::SectionKind
SectionKind - This is a simple POD value that classifies the properties of a section.
Definition: SectionKind.h:22
llvm::TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF
TargetLoweringObjectFileGOFF()
Definition: TargetLoweringObjectFileImpl.cpp:2546
llvm::TargetLoweringObjectFileXCOFF::ShouldSetSSPCanaryBitInTB
static bool ShouldSetSSPCanaryBitInTB(const MachineFunction *MF)
Definition: TargetLoweringObjectFileImpl.cpp:2194
llvm::TargetLoweringObjectFileELF::getSectionForCommandLines
MCSection * getSectionForCommandLines() const override
If supported, return the section to use for the llvm.commandline metadata.
Definition: TargetLoweringObjectFileImpl.cpp:1111
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:1223
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:116
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:1590
llvm::TargetLoweringObjectFileXCOFF
Definition: TargetLoweringObjectFileImpl.h:226
llvm::TargetLoweringObjectFileXCOFF::getStorageClassForGlobal
static XCOFF::StorageClass getStorageClassForGlobal(const GlobalValue *GV)
Definition: TargetLoweringObjectFileImpl.cpp:2467
llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1629
llvm::TargetLoweringObjectFileXCOFF::lowerRelativeReference
const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2459
llvm::TargetLoweringObjectFileGOFF
Definition: TargetLoweringObjectFileImpl.h:287
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:987
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:413
llvm::TargetLoweringObjectFileWasm::lowerRelativeReference
const MCExpr * lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2130
llvm::SmallVectorImpl< char >
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
llvm::MCValue
This represents an "assembler immediate".
Definition: MCValue.h:37
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:1966
llvm::TargetLoweringObjectFileGOFF::SelectSectionForGlobal
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:2554
llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable
MCSection * getSectionForJumpTable(const Function &F, const TargetMachine &TM) const override
Definition: TargetLoweringObjectFileImpl.cpp:1712
llvm::TargetLoweringObjectFileCOFF::getStaticCtorSection
MCSection * getStaticCtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1889
llvm::TargetLoweringObjectFileCOFF::getStaticDtorSection
MCSection * getStaticDtorSection(unsigned Priority, const MCSymbol *KeySym) const override
Definition: TargetLoweringObjectFileImpl.cpp:1896
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:2410
llvm::TargetLoweringObjectFileCOFF
Definition: TargetLoweringObjectFileImpl.h:157
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:1903