Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
MachineMemOperand.h
Go to the documentation of this file.
1//==- llvm/CodeGen/MachineMemOperand.h - MachineMemOperand class -*- 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 contains the declaration of the MachineMemOperand class, which is a
10// description of a memory reference. It is used to help track dependencies
11// in the backend.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H
16#define LLVM_CODEGEN_MACHINEMEMOPERAND_H
17
18#include "llvm/ADT/BitmaskEnum.h"
19#include "llvm/ADT/PointerUnion.h"
20#include "llvm/Analysis/MemoryLocation.h"
21#include "llvm/CodeGen/PseudoSourceValue.h"
22#include "llvm/CodeGenTypes/LowLevelType.h"
23#include "llvm/IR/DerivedTypes.h"
24#include "llvm/IR/LLVMContext.h"
25#include "llvm/IR/Metadata.h"
26#include "llvm/IR/Value.h"// PointerLikeTypeTraits<Value*>
27#include "llvm/Support/AtomicOrdering.h"
28#include "llvm/Support/DataTypes.h"
29
30namespacellvm {
31
32classMDNode;
33classraw_ostream;
34classMachineFunction;
35classModuleSlotTracker;
36classTargetInstrInfo;
37
38/// This class contains a discriminated union of information about pointers in
39/// memory operands, relating them back to LLVM IR or to virtual locations (such
40/// as frame indices) that are exposed during codegen.
41structMachinePointerInfo {
42 /// This is the IR pointer value for the access, or it is null if unknown.
43PointerUnion<const Value *, const PseudoSourceValue *>V;
44
45 /// Offset - This is an offset from the base Value*.
46 int64_tOffset;
47
48unsignedAddrSpace = 0;
49
50uint8_tStackID;
51
52explicitMachinePointerInfo(constValue *v, int64_t offset = 0,
53uint8_tID = 0)
54 :V(v),Offset(offset),StackID(ID) {
55AddrSpace = v ? v->getType()->getPointerAddressSpace() : 0;
56 }
57
58explicitMachinePointerInfo(constPseudoSourceValue *v, int64_t offset = 0,
59uint8_tID = 0)
60 :V(v),Offset(offset),StackID(ID) {
61AddrSpace = v ? v->getAddressSpace() : 0;
62 }
63
64explicitMachinePointerInfo(unsignedAddressSpace = 0, int64_t offset = 0)
65 :V((constValue *)nullptr),Offset(offset),AddrSpace(AddressSpace),
66StackID(0) {}
67
68explicitMachinePointerInfo(
69PointerUnion<const Value *, const PseudoSourceValue *> v,
70 int64_t offset = 0,
71uint8_tID = 0)
72 :V(v),Offset(offset),StackID(ID) {
73if (V) {
74if (constauto *ValPtr = dyn_cast_if_present<const Value *>(V))
75AddrSpace = ValPtr->getType()->getPointerAddressSpace();
76else
77AddrSpace = cast<const PseudoSourceValue *>(V)->getAddressSpace();
78 }
79 }
80
81MachinePointerInfogetWithOffset(int64_t O) const{
82if (V.isNull())
83returnMachinePointerInfo(AddrSpace,Offset + O);
84if (isa<const Value *>(V))
85returnMachinePointerInfo(cast<const Value *>(V),Offset + O,StackID);
86returnMachinePointerInfo(cast<const PseudoSourceValue *>(V),Offset + O,
87StackID);
88 }
89
90 /// Return true if memory region [V, V+Offset+Size) is known to be
91 /// dereferenceable.
92boolisDereferenceable(unsignedSize,LLVMContext &C,
93constDataLayout &DL)const;
94
95 /// Return the LLVM IR address space number that this pointer points into.
96unsignedgetAddrSpace()const;
97
98 /// Return a MachinePointerInfo record that refers to the constant pool.
99staticMachinePointerInfogetConstantPool(MachineFunction &MF);
100
101 /// Return a MachinePointerInfo record that refers to the specified
102 /// FrameIndex.
103staticMachinePointerInfogetFixedStack(MachineFunction &MF,int FI,
104 int64_tOffset = 0);
105
106 /// Return a MachinePointerInfo record that refers to a jump table entry.
107staticMachinePointerInfogetJumpTable(MachineFunction &MF);
108
109 /// Return a MachinePointerInfo record that refers to a GOT entry.
110staticMachinePointerInfogetGOT(MachineFunction &MF);
111
112 /// Stack pointer relative access.
113staticMachinePointerInfogetStack(MachineFunction &MF, int64_tOffset,
114uint8_tID = 0);
115
116 /// Stack memory without other information.
117staticMachinePointerInfogetUnknownStack(MachineFunction &MF);
118};
119
120
121//===----------------------------------------------------------------------===//
122/// A description of a memory reference used in the backend.
123/// Instead of holding a StoreInst or LoadInst, this class holds the address
124/// Value of the reference along with a byte size and offset. This allows it
125/// to describe lowered loads and stores. Also, the special PseudoSourceValue
126/// objects can be used to represent loads and stores to memory locations
127/// that aren't explicit in the regular LLVM IR.
128///
129classMachineMemOperand {
130public:
131 /// Flags values. These may be or'd together.
132enumFlags :uint16_t {
133// No flags set.
134MONone = 0,
135 /// The memory access reads data.
136MOLoad = 1u << 0,
137 /// The memory access writes data.
138MOStore = 1u << 1,
139 /// The memory access is volatile.
140MOVolatile = 1u << 2,
141 /// The memory access is non-temporal.
142MONonTemporal = 1u << 3,
143 /// The memory access is dereferenceable (i.e., doesn't trap).
144MODereferenceable = 1u << 4,
145 /// The memory access always returns the same value (or traps).
146MOInvariant = 1u << 5,
147
148// Reserved for use by target-specific passes.
149// Targets may override getSerializableMachineMemOperandTargetFlags() to
150// enable MIR serialization/parsing of these flags. If more of these flags
151// are added, the MIR printing/parsing code will need to be updated as well.
152MOTargetFlag1 = 1u << 6,
153MOTargetFlag2 = 1u << 7,
154MOTargetFlag3 = 1u << 8,
155MOTargetFlag4 = 1u << 9,
156
157LLVM_MARK_AS_BITMASK_ENUM(/* LargestFlag = */MOTargetFlag4)
158 };
159
160private:
161 /// Atomic information for this memory operation.
162structMachineAtomicInfo {
163 /// Synchronization scope ID for this memory operation.
164unsigned SSID : 8;// SyncScope::ID
165 /// Atomic ordering requirements for this memory operation. For cmpxchg
166 /// atomic operations, atomic ordering requirements when store occurs.
167unsigned Ordering : 4;// enum AtomicOrdering
168 /// For cmpxchg atomic operations, atomic ordering requirements when store
169 /// does not occur.
170unsigned FailureOrdering : 4;// enum AtomicOrdering
171 };
172
173 MachinePointerInfo PtrInfo;
174
175 /// Track the memory type of the access. An access size which is unknown or
176 /// too large to be represented by LLT should use the invalid LLT.
177 LLT MemoryType;
178
179Flags FlagVals;
180 Align BaseAlign;
181 MachineAtomicInfo AtomicInfo;
182 AAMDNodes AAInfo;
183const MDNode *Ranges;
184
185public:
186 /// Construct a MachineMemOperand object with the specified PtrInfo, flags,
187 /// size, and base alignment. For atomic operations the synchronization scope
188 /// and atomic ordering requirements must also be specified. For cmpxchg
189 /// atomic operations the atomic ordering requirements when store does not
190 /// occur must also be specified.
191 MachineMemOperand(MachinePointerInfo PtrInfo,Flags flags, LocationSize TS,
192 Align a,const AAMDNodes &AAInfo = AAMDNodes(),
193const MDNode *Ranges =nullptr,
194SyncScope::ID SSID =SyncScope::System,
195AtomicOrdering Ordering =AtomicOrdering::NotAtomic,
196AtomicOrdering FailureOrdering =AtomicOrdering::NotAtomic);
197 MachineMemOperand(MachinePointerInfo PtrInfo,Flags flags, LLT type, Align a,
198const AAMDNodes &AAInfo = AAMDNodes(),
199const MDNode *Ranges =nullptr,
200SyncScope::ID SSID =SyncScope::System,
201AtomicOrdering Ordering =AtomicOrdering::NotAtomic,
202AtomicOrdering FailureOrdering =AtomicOrdering::NotAtomic);
203
204constMachinePointerInfo &getPointerInfo() const{return PtrInfo; }
205
206 /// Return the base address of the memory access. This may either be a normal
207 /// LLVM IR Value, or one of the special values used in CodeGen.
208 /// Special values are those obtained via
209 /// PseudoSourceValue::getFixedStack(int), PseudoSourceValue::getStack, and
210 /// other PseudoSourceValue member functions which return objects which stand
211 /// for frame/stack pointer relative references and other special references
212 /// which are not representable in the high-level IR.
213constValue *getValue() const{
214return dyn_cast_if_present<const Value *>(PtrInfo.V);
215 }
216
217constPseudoSourceValue *getPseudoValue() const{
218return dyn_cast_if_present<const PseudoSourceValue *>(PtrInfo.V);
219 }
220
221constvoid *getOpaqueValue() const{return PtrInfo.V.getOpaqueValue(); }
222
223 /// Return the raw flags of the source value, \see Flags.
224FlagsgetFlags() const{return FlagVals; }
225
226 /// Bitwise OR the current flags with the given flags.
227voidsetFlags(Flags f) { FlagVals |= f; }
228
229 /// For normal values, this is a byte offset added to the base address.
230 /// For PseudoSourceValue::FPRel values, this is the FrameIndex number.
231 int64_tgetOffset() const{return PtrInfo.Offset; }
232
233unsignedgetAddrSpace() const{return PtrInfo.getAddrSpace(); }
234
235 /// Return the memory type of the memory reference. This should only be relied
236 /// on for GlobalISel G_* operation legalization.
237LLTgetMemoryType() const{return MemoryType; }
238
239 /// Return the size in bytes of the memory reference.
240LocationSizegetSize() const{
241return MemoryType.isValid()
242 ?LocationSize::precise(MemoryType.getSizeInBytes())
243 :LocationSize::beforeOrAfterPointer();
244 }
245
246 /// Return the size in bits of the memory reference.
247LocationSizegetSizeInBits() const{
248return MemoryType.isValid()
249 ?LocationSize::precise(MemoryType.getSizeInBits())
250 :LocationSize::beforeOrAfterPointer();
251 }
252
253LLTgetType() const{
254return MemoryType;
255 }
256
257 /// Return the minimum known alignment in bytes of the actual memory
258 /// reference.
259AligngetAlign()const;
260
261 /// Return the minimum known alignment in bytes of the base address, without
262 /// the offset.
263AligngetBaseAlign() const{return BaseAlign; }
264
265 /// Return the AA tags for the memory reference.
266AAMDNodesgetAAInfo() const{return AAInfo; }
267
268 /// Return the range tag for the memory reference.
269constMDNode *getRanges() const{return Ranges; }
270
271 /// Returns the synchronization scope ID for this memory operation.
272SyncScope::IDgetSyncScopeID() const{
273returnstatic_cast<SyncScope::ID>(AtomicInfo.SSID);
274 }
275
276 /// Return the atomic ordering requirements for this memory operation. For
277 /// cmpxchg atomic operations, return the atomic ordering requirements when
278 /// store occurs.
279AtomicOrderinggetSuccessOrdering() const{
280returnstatic_cast<AtomicOrdering>(AtomicInfo.Ordering);
281 }
282
283 /// For cmpxchg atomic operations, return the atomic ordering requirements
284 /// when store does not occur.
285AtomicOrderinggetFailureOrdering() const{
286returnstatic_cast<AtomicOrdering>(AtomicInfo.FailureOrdering);
287 }
288
289 /// Return a single atomic ordering that is at least as strong as both the
290 /// success and failure orderings for an atomic operation. (For operations
291 /// other than cmpxchg, this is equivalent to getSuccessOrdering().)
292AtomicOrderinggetMergedOrdering() const{
293returngetMergedAtomicOrdering(getSuccessOrdering(),getFailureOrdering());
294 }
295
296boolisLoad() const{return FlagVals &MOLoad; }
297boolisStore() const{return FlagVals &MOStore; }
298boolisVolatile() const{return FlagVals &MOVolatile; }
299boolisNonTemporal() const{return FlagVals &MONonTemporal; }
300boolisDereferenceable() const{return FlagVals &MODereferenceable; }
301boolisInvariant() const{return FlagVals &MOInvariant; }
302
303 /// Returns true if this operation has an atomic ordering requirement of
304 /// unordered or higher, false otherwise.
305boolisAtomic() const{
306returngetSuccessOrdering() !=AtomicOrdering::NotAtomic;
307 }
308
309 /// Returns true if this memory operation doesn't have any ordering
310 /// constraints other than normal aliasing. Volatile and (ordered) atomic
311 /// memory operations can't be reordered.
312boolisUnordered() const{
313return (getSuccessOrdering() ==AtomicOrdering::NotAtomic ||
314getSuccessOrdering() ==AtomicOrdering::Unordered) &&
315 !isVolatile();
316 }
317
318 /// Update this MachineMemOperand to reflect the alignment of MMO, if it has a
319 /// greater alignment. This must only be used when the new alignment applies
320 /// to all users of this MachineMemOperand.
321voidrefineAlignment(constMachineMemOperand *MMO);
322
323 /// Change the SourceValue for this MachineMemOperand. This should only be
324 /// used when an object is being relocated and all references to it are being
325 /// updated.
326voidsetValue(constValue *NewSV) { PtrInfo.V = NewSV; }
327voidsetValue(constPseudoSourceValue *NewSV) { PtrInfo.V = NewSV; }
328voidsetOffset(int64_t NewOffset) { PtrInfo.Offset = NewOffset; }
329
330 /// Reset the tracked memory type.
331voidsetType(LLT NewTy) {
332 MemoryType = NewTy;
333 }
334
335 /// Unset the tracked range metadata.
336voidclearRanges() { Ranges =nullptr; }
337
338 /// Support for operator<<.
339 /// @{
340voidprint(raw_ostream &OS,ModuleSlotTracker &MST,
341SmallVectorImpl<StringRef> &SSNs,constLLVMContext &Context,
342constMachineFrameInfo *MFI,constTargetInstrInfo *TII)const;
343 /// @}
344
345friendbooloperator==(constMachineMemOperand &LHS,
346constMachineMemOperand &RHS) {
347returnLHS.getValue() ==RHS.getValue() &&
348LHS.getPseudoValue() ==RHS.getPseudoValue() &&
349LHS.getSize() ==RHS.getSize() &&
350LHS.getOffset() ==RHS.getOffset() &&
351LHS.getFlags() ==RHS.getFlags() &&
352LHS.getAAInfo() ==RHS.getAAInfo() &&
353LHS.getRanges() ==RHS.getRanges() &&
354LHS.getAlign() ==RHS.getAlign() &&
355LHS.getAddrSpace() ==RHS.getAddrSpace();
356 }
357
358friendbooloperator!=(constMachineMemOperand &LHS,
359constMachineMemOperand &RHS) {
360return !(LHS ==RHS);
361 }
362};
363
364}// End llvm namespace
365
366#endif
const
aarch64 promote const
Definition:AArch64PromoteConstant.cpp:230
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition:ARMSLSHardening.cpp:73
AtomicOrdering.h
Atomic ordering constants.
BitmaskEnum.h
DerivedTypes.h
Size
uint64_t Size
Definition:ELFObjHandler.cpp:81
TII
const HexagonInstrInfo * TII
Definition:HexagonCopyToCombine.cpp:125
Value.h
LLVMContext.h
LowLevelType.h
Implement a low-level type suitable for MachineInstr level instruction selection.
MemoryLocation.h
This file provides utility analysis objects describing memory locations.
Metadata.h
This file contains the declarations for metadata subclasses.
PointerUnion.h
This file defines the PointerUnion class, which is a discriminated union of pointer types.
PseudoSourceValue.h
OS
raw_pwrite_stream & OS
Definition:SampleProfWriter.cpp:51
RHS
Value * RHS
Definition:X86PartialReduction.cpp:74
LHS
Value * LHS
Definition:X86PartialReduction.cpp:73
llvm::AtomicInfo
Definition:Atomic.h:16
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition:DataLayout.h:63
llvm::LLT
Definition:LowLevelType.h:39
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition:LLVMContext.h:67
llvm::LocationSize
Definition:MemoryLocation.h:68
llvm::LocationSize::precise
static LocationSize precise(uint64_t Value)
Definition:MemoryLocation.h:108
llvm::LocationSize::beforeOrAfterPointer
static constexpr LocationSize beforeOrAfterPointer()
Any location before or after the base pointer (but still within the underlying object).
Definition:MemoryLocation.h:137
llvm::MDNode
Metadata node.
Definition:Metadata.h:1073
llvm::MachineFrameInfo
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
Definition:MachineFrameInfo.h:106
llvm::MachineFunction
Definition:MachineFunction.h:267
llvm::MachineMemOperand
A description of a memory reference used in the backend.
Definition:MachineMemOperand.h:129
llvm::MachineMemOperand::getType
LLT getType() const
Definition:MachineMemOperand.h:253
llvm::MachineMemOperand::setType
void setType(LLT NewTy)
Reset the tracked memory type.
Definition:MachineMemOperand.h:331
llvm::MachineMemOperand::getSize
LocationSize getSize() const
Return the size in bytes of the memory reference.
Definition:MachineMemOperand.h:240
llvm::MachineMemOperand::isVolatile
bool isVolatile() const
Definition:MachineMemOperand.h:298
llvm::MachineMemOperand::getFailureOrdering
AtomicOrdering getFailureOrdering() const
For cmpxchg atomic operations, return the atomic ordering requirements when store does not occur.
Definition:MachineMemOperand.h:285
llvm::MachineMemOperand::getPseudoValue
const PseudoSourceValue * getPseudoValue() const
Definition:MachineMemOperand.h:217
llvm::MachineMemOperand::getMemoryType
LLT getMemoryType() const
Return the memory type of the memory reference.
Definition:MachineMemOperand.h:237
llvm::MachineMemOperand::getAddrSpace
unsigned getAddrSpace() const
Definition:MachineMemOperand.h:233
llvm::MachineMemOperand::clearRanges
void clearRanges()
Unset the tracked range metadata.
Definition:MachineMemOperand.h:336
llvm::MachineMemOperand::print
void print(raw_ostream &OS, ModuleSlotTracker &MST, SmallVectorImpl< StringRef > &SSNs, const LLVMContext &Context, const MachineFrameInfo *MFI, const TargetInstrInfo *TII) const
Support for operator<<.
Definition:MachineOperand.cpp:1150
llvm::MachineMemOperand::isNonTemporal
bool isNonTemporal() const
Definition:MachineMemOperand.h:299
llvm::MachineMemOperand::isUnordered
bool isUnordered() const
Returns true if this memory operation doesn't have any ordering constraints other than normal aliasin...
Definition:MachineMemOperand.h:312
llvm::MachineMemOperand::getRanges
const MDNode * getRanges() const
Return the range tag for the memory reference.
Definition:MachineMemOperand.h:269
llvm::MachineMemOperand::setValue
void setValue(const Value *NewSV)
Change the SourceValue for this MachineMemOperand.
Definition:MachineMemOperand.h:326
llvm::MachineMemOperand::isAtomic
bool isAtomic() const
Returns true if this operation has an atomic ordering requirement of unordered or higher,...
Definition:MachineMemOperand.h:305
llvm::MachineMemOperand::refineAlignment
void refineAlignment(const MachineMemOperand *MMO)
Update this MachineMemOperand to reflect the alignment of MMO, if it has a greater alignment.
Definition:MachineOperand.cpp:1128
llvm::MachineMemOperand::getSyncScopeID
SyncScope::ID getSyncScopeID() const
Returns the synchronization scope ID for this memory operation.
Definition:MachineMemOperand.h:272
llvm::MachineMemOperand::getOpaqueValue
const void * getOpaqueValue() const
Definition:MachineMemOperand.h:221
llvm::MachineMemOperand::isInvariant
bool isInvariant() const
Definition:MachineMemOperand.h:301
llvm::MachineMemOperand::operator!=
friend bool operator!=(const MachineMemOperand &LHS, const MachineMemOperand &RHS)
Definition:MachineMemOperand.h:358
llvm::MachineMemOperand::isLoad
bool isLoad() const
Definition:MachineMemOperand.h:296
llvm::MachineMemOperand::getMergedOrdering
AtomicOrdering getMergedOrdering() const
Return a single atomic ordering that is at least as strong as both the success and failure orderings ...
Definition:MachineMemOperand.h:292
llvm::MachineMemOperand::setOffset
void setOffset(int64_t NewOffset)
Definition:MachineMemOperand.h:328
llvm::MachineMemOperand::isStore
bool isStore() const
Definition:MachineMemOperand.h:297
llvm::MachineMemOperand::Flags
Flags
Flags values. These may be or'd together.
Definition:MachineMemOperand.h:132
llvm::MachineMemOperand::MOTargetFlag2
@ MOTargetFlag2
Definition:MachineMemOperand.h:153
llvm::MachineMemOperand::MOVolatile
@ MOVolatile
The memory access is volatile.
Definition:MachineMemOperand.h:140
llvm::MachineMemOperand::MODereferenceable
@ MODereferenceable
The memory access is dereferenceable (i.e., doesn't trap).
Definition:MachineMemOperand.h:144
llvm::MachineMemOperand::MOLoad
@ MOLoad
The memory access reads data.
Definition:MachineMemOperand.h:136
llvm::MachineMemOperand::MONonTemporal
@ MONonTemporal
The memory access is non-temporal.
Definition:MachineMemOperand.h:142
llvm::MachineMemOperand::MONone
@ MONone
Definition:MachineMemOperand.h:134
llvm::MachineMemOperand::MOInvariant
@ MOInvariant
The memory access always returns the same value (or traps).
Definition:MachineMemOperand.h:146
llvm::MachineMemOperand::MOTargetFlag1
@ MOTargetFlag1
Definition:MachineMemOperand.h:152
llvm::MachineMemOperand::MOTargetFlag3
@ MOTargetFlag3
Definition:MachineMemOperand.h:154
llvm::MachineMemOperand::MOStore
@ MOStore
The memory access writes data.
Definition:MachineMemOperand.h:138
llvm::MachineMemOperand::MOTargetFlag4
@ MOTargetFlag4
Definition:MachineMemOperand.h:155
llvm::MachineMemOperand::getSuccessOrdering
AtomicOrdering getSuccessOrdering() const
Return the atomic ordering requirements for this memory operation.
Definition:MachineMemOperand.h:279
llvm::MachineMemOperand::setFlags
void setFlags(Flags f)
Bitwise OR the current flags with the given flags.
Definition:MachineMemOperand.h:227
llvm::MachineMemOperand::getPointerInfo
const MachinePointerInfo & getPointerInfo() const
Definition:MachineMemOperand.h:204
llvm::MachineMemOperand::getFlags
Flags getFlags() const
Return the raw flags of the source value,.
Definition:MachineMemOperand.h:224
llvm::MachineMemOperand::getAlign
Align getAlign() const
Return the minimum known alignment in bytes of the actual memory reference.
Definition:MachineOperand.cpp:1146
llvm::MachineMemOperand::getSizeInBits
LocationSize getSizeInBits() const
Return the size in bits of the memory reference.
Definition:MachineMemOperand.h:247
llvm::MachineMemOperand::isDereferenceable
bool isDereferenceable() const
Definition:MachineMemOperand.h:300
llvm::MachineMemOperand::operator==
friend bool operator==(const MachineMemOperand &LHS, const MachineMemOperand &RHS)
Definition:MachineMemOperand.h:345
llvm::MachineMemOperand::getAAInfo
AAMDNodes getAAInfo() const
Return the AA tags for the memory reference.
Definition:MachineMemOperand.h:266
llvm::MachineMemOperand::setValue
void setValue(const PseudoSourceValue *NewSV)
Definition:MachineMemOperand.h:327
llvm::MachineMemOperand::getValue
const Value * getValue() const
Return the base address of the memory access.
Definition:MachineMemOperand.h:213
llvm::MachineMemOperand::getBaseAlign
Align getBaseAlign() const
Return the minimum known alignment in bytes of the base address, without the offset.
Definition:MachineMemOperand.h:263
llvm::MachineMemOperand::getOffset
int64_t getOffset() const
For normal values, this is a byte offset added to the base address.
Definition:MachineMemOperand.h:231
llvm::ModuleSlotTracker
Manage lifetime of a slot tracker for printing IR.
Definition:ModuleSlotTracker.h:44
llvm::PointerUnion
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
Definition:PointerUnion.h:118
llvm::PointerUnion::isNull
bool isNull() const
Test if the pointer held in the union is null, regardless of which type it is.
Definition:PointerUnion.h:142
llvm::PseudoSourceValue
Special value supplied for machine level alias analysis.
Definition:PseudoSourceValue.h:31
llvm::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition:SmallVector.h:573
llvm::TargetInstrInfo
TargetInstrInfo - Interface to description of machine instruction set.
Definition:TargetInstrInfo.h:112
llvm::Value
LLVM Value Representation.
Definition:Value.h:74
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition:raw_ostream.h:52
uint16_t
uint8_t
unsigned
DataTypes.h
llvm::CallingConv::C
@ C
The default llvm calling convention, compatible with C.
Definition:CallingConv.h:34
llvm::NVPTXAS::AddressSpace
AddressSpace
Definition:NVPTXAddrSpace.h:20
llvm::SyncScope::ID
uint8_t ID
Definition:LLVMContext.h:46
llvm::SyncScope::System
@ System
Synchronized with respect to all concurrently executing threads.
Definition:LLVMContext.h:57
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:AddressRanges.h:18
llvm::getMergedAtomicOrdering
AtomicOrdering getMergedAtomicOrdering(AtomicOrdering AO, AtomicOrdering Other)
Return a single atomic ordering that is at least as strong as both the AO and Other orderings for an ...
Definition:AtomicOrdering.h:139
llvm::AtomicOrdering
AtomicOrdering
Atomic ordering for LLVM's memory model.
Definition:AtomicOrdering.h:56
llvm::AtomicOrdering::Unordered
@ Unordered
llvm::AtomicOrdering::NotAtomic
@ NotAtomic
llvm::ModRefInfo::LLVM_MARK_AS_BITMASK_ENUM
@ LLVM_MARK_AS_BITMASK_ENUM
llvm::AAMDNodes
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
Definition:Metadata.h:764
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition:Alignment.h:39
llvm::MachinePointerInfo
This class contains a discriminated union of information about pointers in memory operands,...
Definition:MachineMemOperand.h:41
llvm::MachinePointerInfo::getJumpTable
static MachinePointerInfo getJumpTable(MachineFunction &MF)
Return a MachinePointerInfo record that refers to a jump table entry.
Definition:MachineOperand.cpp:1077
llvm::MachinePointerInfo::isDereferenceable
bool isDereferenceable(unsigned Size, LLVMContext &C, const DataLayout &DL) const
Return true if memory region [V, V+Offset+Size) is known to be dereferenceable.
Definition:MachineOperand.cpp:1050
llvm::MachinePointerInfo::MachinePointerInfo
MachinePointerInfo(const PseudoSourceValue *v, int64_t offset=0, uint8_t ID=0)
Definition:MachineMemOperand.h:58
llvm::MachinePointerInfo::getAddrSpace
unsigned getAddrSpace() const
Return the LLVM IR address space number that this pointer points into.
Definition:MachineOperand.cpp:1046
llvm::MachinePointerInfo::getStack
static MachinePointerInfo getStack(MachineFunction &MF, int64_t Offset, uint8_t ID=0)
Stack pointer relative access.
Definition:MachineOperand.cpp:1085
llvm::MachinePointerInfo::StackID
uint8_t StackID
Definition:MachineMemOperand.h:50
llvm::MachinePointerInfo::MachinePointerInfo
MachinePointerInfo(unsigned AddressSpace=0, int64_t offset=0)
Definition:MachineMemOperand.h:64
llvm::MachinePointerInfo::Offset
int64_t Offset
Offset - This is an offset from the base Value*.
Definition:MachineMemOperand.h:46
llvm::MachinePointerInfo::AddrSpace
unsigned AddrSpace
Definition:MachineMemOperand.h:48
llvm::MachinePointerInfo::MachinePointerInfo
MachinePointerInfo(PointerUnion< const Value *, const PseudoSourceValue * > v, int64_t offset=0, uint8_t ID=0)
Definition:MachineMemOperand.h:68
llvm::MachinePointerInfo::V
PointerUnion< const Value *, const PseudoSourceValue * > V
This is the IR pointer value for the access, or it is null if unknown.
Definition:MachineMemOperand.h:43
llvm::MachinePointerInfo::getConstantPool
static MachinePointerInfo getConstantPool(MachineFunction &MF)
Return a MachinePointerInfo record that refers to the constant pool.
Definition:MachineOperand.cpp:1066
llvm::MachinePointerInfo::getWithOffset
MachinePointerInfo getWithOffset(int64_t O) const
Definition:MachineMemOperand.h:81
llvm::MachinePointerInfo::getUnknownStack
static MachinePointerInfo getUnknownStack(MachineFunction &MF)
Stack memory without other information.
Definition:MachineOperand.cpp:1090
llvm::MachinePointerInfo::getGOT
static MachinePointerInfo getGOT(MachineFunction &MF)
Return a MachinePointerInfo record that refers to a GOT entry.
Definition:MachineOperand.cpp:1081
llvm::MachinePointerInfo::MachinePointerInfo
MachinePointerInfo(const Value *v, int64_t offset=0, uint8_t ID=0)
Definition:MachineMemOperand.h:52
llvm::MachinePointerInfo::getFixedStack
static MachinePointerInfo getFixedStack(MachineFunction &MF, int FI, int64_t Offset=0)
Return a MachinePointerInfo record that refers to the specified FrameIndex.
Definition:MachineOperand.cpp:1072

Generated on Thu Jul 17 2025 09:53:08 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp