LLVM 23.0.0git
ModRef.h
Go to the documentation of this file.
1//===--- ModRef.h - Memory effect modeling ----------------------*- 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// Definitions of ModRefInfo and MemoryEffects, which are used to
10// describe the memory effects of instructions.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_SUPPORT_MODREF_H
15#define LLVM_SUPPORT_MODREF_H
16
18#include "llvm/ADT/Sequence.h"
21
22namespace llvm {
23
24/// Flags indicating whether a memory access modifies or references memory.
25///
26/// This is no access at all, a modification, a reference, or both
27/// a modification and a reference.
28enum class ModRefInfo : uint8_t {
29 /// The access neither references nor modifies the value stored in memory.
31 /// The access may reference the value stored in memory.
32 Ref = 1,
33 /// The access may modify the value stored in memory.
34 Mod = 2,
35 /// The access may reference and may modify the value stored in memory.
38};
39
40[[nodiscard]] inline bool isNoModRef(const ModRefInfo MRI) {
41 return MRI == ModRefInfo::NoModRef;
42}
43[[nodiscard]] inline bool isModOrRefSet(const ModRefInfo MRI) {
44 return MRI != ModRefInfo::NoModRef;
45}
46[[nodiscard]] inline bool isModAndRefSet(const ModRefInfo MRI) {
47 return MRI == ModRefInfo::ModRef;
48}
49[[nodiscard]] inline bool isModSet(const ModRefInfo MRI) {
50 return static_cast<int>(MRI) & static_cast<int>(ModRefInfo::Mod);
51}
52[[nodiscard]] inline bool isRefSet(const ModRefInfo MRI) {
53 return static_cast<int>(MRI) & static_cast<int>(ModRefInfo::Ref);
54}
55
56/// Debug print ModRefInfo.
57LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, ModRefInfo MR);
58
59/// The locations at which a function might access memory.
60enum class IRMemLocation {
61 /// Access to memory via argument pointers.
62 ArgMem = 0,
63 /// Memory that is inaccessible via LLVM IR.
65 /// Errno memory.
67 /// Any other memory.
68 Other = 3,
69 /// Represents target specific state.
72
73 /// Helpers to iterate all locations in the MemoryEffectsBase class.
76};
77
78template <typename LocationEnum> class MemoryEffectsBase {
79public:
80 using Location = LocationEnum;
81
82private:
83 uint32_t Data = 0;
84
85 static constexpr uint32_t BitsPerLoc = 2;
86 static constexpr uint32_t LocMask = (1 << BitsPerLoc) - 1;
87
88 static uint32_t getLocationPos(Location Loc) {
89 return (uint32_t)Loc * BitsPerLoc;
90 }
91
93
94 void setModRef(Location Loc, ModRefInfo MR) {
95 Data &= ~(LocMask << getLocationPos(Loc));
96 Data |= static_cast<uint32_t>(MR) << getLocationPos(Loc);
97 }
98
99public:
100 /// Returns iterator over all supported location kinds.
101 static auto locations() {
102 return enum_seq_inclusive(Location::First, Location::Last,
104 }
105
106 static auto targetMemLocations() {
107 return enum_seq_inclusive(Location::TargetMem0, Location::TargetMem1,
109 }
110
111 /// Create MemoryEffectsBase that can access only the given location with the
112 /// given ModRefInfo.
113 MemoryEffectsBase(Location Loc, ModRefInfo MR) { setModRef(Loc, MR); }
114
115 /// Create MemoryEffectsBase that can access any location with the given
116 /// ModRefInfo.
118 for (Location Loc : locations())
119 setModRef(Loc, MR);
120 }
121
122 /// Create MemoryEffectsBase that can read and write any memory.
123 static MemoryEffectsBase unknown() {
124 return MemoryEffectsBase(ModRefInfo::ModRef);
125 }
126
127 /// Create MemoryEffectsBase that cannot read or write any memory.
128 static MemoryEffectsBase none() {
129 return MemoryEffectsBase(ModRefInfo::NoModRef);
130 }
131
132 /// Create MemoryEffectsBase that can read any memory.
133 static MemoryEffectsBase readOnly() {
134 return MemoryEffectsBase(ModRefInfo::Ref);
135 }
136
137 /// Create MemoryEffectsBase that can write any memory.
138 static MemoryEffectsBase writeOnly() {
139 return MemoryEffectsBase(ModRefInfo::Mod);
140 }
141
142 /// Create MemoryEffectsBase that can only access argument memory.
143 static MemoryEffectsBase argMemOnly(ModRefInfo MR = ModRefInfo::ModRef) {
144 return MemoryEffectsBase(Location::ArgMem, MR);
145 }
146
147 /// Create MemoryEffectsBase that can only access inaccessible memory.
148 static MemoryEffectsBase
150 return MemoryEffectsBase(Location::InaccessibleMem, MR);
151 }
152
153 /// Create MemoryEffectsBase that can only access errno memory.
154 static MemoryEffectsBase errnoMemOnly(ModRefInfo MR = ModRefInfo::ModRef) {
155 return MemoryEffectsBase(Location::ErrnoMem, MR);
156 }
157
158 /// Create MemoryEffectsBase that can only access other memory.
159 static MemoryEffectsBase otherMemOnly(ModRefInfo MR = ModRefInfo::ModRef) {
160 return MemoryEffectsBase(Location::Other, MR);
161 }
162
163 /// Create MemoryEffectsBase that can only access inaccessible or argument
164 /// memory.
165 static MemoryEffectsBase
167 MemoryEffectsBase FRMB = none();
168 FRMB.setModRef(Location::ArgMem, MR);
169 FRMB.setModRef(Location::InaccessibleMem, MR);
170 return FRMB;
171 }
172
173 /// Create MemoryEffectsBase that can only access inaccessible or errno
174 /// memory.
175 static MemoryEffectsBase
177 ModRefInfo ErrnoMR = ModRefInfo::ModRef) {
178 MemoryEffectsBase FRMB = none();
179 FRMB.setModRef(Location::InaccessibleMem, InaccessibleMR);
180 FRMB.setModRef(Location::ErrnoMem, ErrnoMR);
181 return FRMB;
182 }
183
184 /// Create MemoryEffectsBase that can only access inaccessible, argument or
185 /// errno memory.
186 static MemoryEffectsBase inaccessibleOrArgOrErrnoMemOnly(
187 ModRefInfo InaccessibleOrArgMR = ModRefInfo::ModRef,
188 ModRefInfo ErrnoMR = ModRefInfo::ModRef) {
189 MemoryEffectsBase FRMB = none();
190 FRMB.setModRef(Location::InaccessibleMem, InaccessibleOrArgMR);
191 FRMB.setModRef(Location::ArgMem, InaccessibleOrArgMR);
192 FRMB.setModRef(Location::ErrnoMem, ErrnoMR);
193 return FRMB;
194 }
195
196 /// Create MemoryEffectsBase that can only access argument or errno memory.
197 static MemoryEffectsBase
199 ModRefInfo ErrnoMR = ModRefInfo::ModRef) {
200 MemoryEffectsBase FRMB = none();
201 FRMB.setModRef(Location::ArgMem, ArgMR);
202 FRMB.setModRef(Location::ErrnoMem, ErrnoMR);
203 return FRMB;
204 }
205
206 /// Create MemoryEffectsBase from an encoded integer value (used by memory
207 /// attribute).
208 static MemoryEffectsBase createFromIntValue(uint32_t Data) {
209 return MemoryEffectsBase(Data);
210 }
211
212 /// Convert MemoryEffectsBase into an encoded integer value (used by memory
213 /// attribute).
215 return Data;
216 }
217
218 /// Get ModRefInfo for the given Location.
220 return ModRefInfo((Data >> getLocationPos(Loc)) & LocMask);
221 }
222
223 /// Get new MemoryEffectsBase with modified ModRefInfo for Loc.
224 MemoryEffectsBase getWithModRef(Location Loc, ModRefInfo MR) const {
225 MemoryEffectsBase ME = *this;
226 ME.setModRef(Loc, MR);
227 return ME;
228 }
229
230 /// Get new MemoryEffectsBase with NoModRef on the given Loc.
231 MemoryEffectsBase getWithoutLoc(Location Loc) const {
232 MemoryEffectsBase ME = *this;
233 ME.setModRef(Loc, ModRefInfo::NoModRef);
234 return ME;
235 }
236
237 /// Get ModRefInfo for any location.
240 for (Location Loc : locations())
241 MR |= getModRef(Loc);
242 return MR;
243 }
244
245 /// Whether this function accesses no memory.
246 bool doesNotAccessMemory() const { return Data == 0; }
247
248 /// Whether this function only (at most) reads memory.
249 bool onlyReadsMemory() const { return !isModSet(getModRef()); }
250
251 /// Whether this function only (at most) writes memory.
252 bool onlyWritesMemory() const { return !isRefSet(getModRef()); }
253
254 /// Whether this function only (at most) accesses argument memory.
256 return getWithoutLoc(Location::ArgMem).doesNotAccessMemory();
257 }
258
259 /// Whether this function may access argument memory.
261 return isModOrRefSet(getModRef(Location::ArgMem));
262 }
263
264 /// Whether this function only (at most) accesses inaccessible memory.
266 return getWithoutLoc(Location::InaccessibleMem).doesNotAccessMemory();
267 }
268
269 /// Whether this function only (at most) accesses inaccessible or target
270 /// memory.
272 MemoryEffectsBase ME = *this;
274 ME &= ME.getWithoutLoc(Loc);
275 return ME.getWithoutLoc(Location::InaccessibleMem).doesNotAccessMemory();
276 }
277
278 /// Whether this function only (at most) accesses errno memory.
279 bool onlyAccessesErrnoMem() const {
280 return getWithoutLoc(Location::ErrnoMem).doesNotAccessMemory();
281 }
282
283 /// Whether this function only (at most) accesses argument and inaccessible
284 /// memory.
286 return getWithoutLoc(Location::InaccessibleMem)
287 .getWithoutLoc(Location::ArgMem)
289 }
290
291 /// Intersect with other MemoryEffectsBase.
292 MemoryEffectsBase operator&(MemoryEffectsBase Other) const {
293 return MemoryEffectsBase(Data & Other.Data);
294 }
295
296 /// Intersect (in-place) with other MemoryEffectsBase.
297 MemoryEffectsBase &operator&=(MemoryEffectsBase Other) {
298 Data &= Other.Data;
299 return *this;
300 }
301
302 /// Union with other MemoryEffectsBase.
303 MemoryEffectsBase operator|(MemoryEffectsBase Other) const {
304 return MemoryEffectsBase(Data | Other.Data);
305 }
306
307 /// Union (in-place) with other MemoryEffectsBase.
308 MemoryEffectsBase &operator|=(MemoryEffectsBase Other) {
309 Data |= Other.Data;
310 return *this;
311 }
312
313 /// Subtract other MemoryEffectsBase.
314 MemoryEffectsBase operator-(MemoryEffectsBase Other) const {
315 return MemoryEffectsBase(Data & ~Other.Data);
316 }
317
318 /// Subtract (in-place) with other MemoryEffectsBase.
319 MemoryEffectsBase &operator-=(MemoryEffectsBase Other) {
320 Data &= ~Other.Data;
321 return *this;
322 }
323
324 /// Check whether this is the same as other MemoryEffectsBase.
325 bool operator==(MemoryEffectsBase Other) const { return Data == Other.Data; }
326
327 /// Check whether this is different from other MemoryEffectsBase.
328 bool operator!=(MemoryEffectsBase Other) const { return !operator==(Other); }
329};
330
331/// Summary of how a function affects memory in the program.
332///
333/// Loads from constant globals are not considered memory accesses for this
334/// interface. Also, functions may freely modify stack space local to their
335/// invocation without having to report it through these interfaces.
337
338/// Debug print MemoryEffects.
340
341// Legacy alias.
343
344/// Components of the pointer that may be captured.
354
356 return CC == CaptureComponents::None;
357}
358
360 return CC != CaptureComponents::None;
361}
362
366
370
375
379
383
385 return CC == CaptureComponents::All;
386}
387
388LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, CaptureComponents CC);
389
390/// Represents which components of the pointer may be captured in which
391/// location. This represents the captures(...) attribute in IR.
392///
393/// For more information on the precise semantics see LangRef.
395 CaptureComponents OtherComponents;
396 CaptureComponents RetComponents;
397
398public:
400 CaptureComponents RetComponents)
401 : OtherComponents(OtherComponents), RetComponents(RetComponents) {}
402
404 : OtherComponents(Components), RetComponents(Components) {}
405
406 /// Create CaptureInfo that does not capture any components of the pointer
408
409 /// Create CaptureInfo that may capture all components of the pointer.
411
412 /// Create CaptureInfo that may only capture via the return value.
413 static CaptureInfo
415 return CaptureInfo(CaptureComponents::None, RetComponents);
416 }
417
418 /// Whether the pointer is only captured via the return value.
419 bool isRetOnly() const { return capturesNothing(OtherComponents); }
420
421 /// Get components potentially captured by the return value.
422 CaptureComponents getRetComponents() const { return RetComponents; }
423
424 /// Get components potentially captured through locations other than the
425 /// return value.
426 CaptureComponents getOtherComponents() const { return OtherComponents; }
427
428 /// Get the potentially captured components of the pointer (regardless of
429 /// location).
430 operator CaptureComponents() const { return OtherComponents | RetComponents; }
431
433 return OtherComponents == Other.OtherComponents &&
434 RetComponents == Other.RetComponents;
435 }
436
437 bool operator!=(CaptureInfo Other) const { return !(*this == Other); }
438
439 /// Compute union of CaptureInfos.
441 return CaptureInfo(OtherComponents | Other.OtherComponents,
442 RetComponents | Other.RetComponents);
443 }
444
445 /// Compute intersection of CaptureInfos.
447 return CaptureInfo(OtherComponents & Other.OtherComponents,
448 RetComponents & Other.RetComponents);
449 }
450
451 /// Compute union of CaptureInfos in-place.
453 OtherComponents |= Other.OtherComponents;
454 RetComponents |= Other.RetComponents;
455 return *this;
456 }
457
458 /// Compute intersection of CaptureInfos in-place.
460 OtherComponents &= Other.OtherComponents;
461 RetComponents &= Other.RetComponents;
462 return *this;
463 }
464
469
470 /// Convert CaptureInfo into an encoded integer value (used by captures
471 /// attribute).
473 return (uint32_t(OtherComponents) << 4) | uint32_t(RetComponents);
474 }
475};
476
477LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, CaptureInfo Info);
478
479} // namespace llvm
480
481#endif
#define LLVM_ABI
Definition Compiler.h:213
Provides some synthesis utilities to produce sequences of values.
Represents which components of the pointer may be captured in which location.
Definition ModRef.h:394
static CaptureInfo createFromIntValue(uint32_t Data)
Definition ModRef.h:465
CaptureComponents getOtherComponents() const
Get components potentially captured through locations other than the return value.
Definition ModRef.h:426
static CaptureInfo none()
Create CaptureInfo that does not capture any components of the pointer.
Definition ModRef.h:407
bool operator==(CaptureInfo Other) const
Definition ModRef.h:432
bool operator!=(CaptureInfo Other) const
Definition ModRef.h:437
static CaptureInfo retOnly(CaptureComponents RetComponents=CaptureComponents::All)
Create CaptureInfo that may only capture via the return value.
Definition ModRef.h:414
static CaptureInfo all()
Create CaptureInfo that may capture all components of the pointer.
Definition ModRef.h:410
CaptureInfo operator&(CaptureInfo Other) const
Compute intersection of CaptureInfos.
Definition ModRef.h:446
CaptureInfo & operator|=(CaptureInfo Other)
Compute union of CaptureInfos in-place.
Definition ModRef.h:452
CaptureComponents getRetComponents() const
Get components potentially captured by the return value.
Definition ModRef.h:422
CaptureInfo(CaptureComponents OtherComponents, CaptureComponents RetComponents)
Definition ModRef.h:399
CaptureInfo & operator&=(CaptureInfo Other)
Compute intersection of CaptureInfos in-place.
Definition ModRef.h:459
CaptureInfo operator|(CaptureInfo Other) const
Compute union of CaptureInfos.
Definition ModRef.h:440
bool isRetOnly() const
Whether the pointer is only captured via the return value.
Definition ModRef.h:419
uint32_t toIntValue() const
Convert CaptureInfo into an encoded integer value (used by captures attribute).
Definition ModRef.h:472
CaptureInfo(CaptureComponents Components)
Definition ModRef.h:403
MemoryEffectsBase operator&(MemoryEffectsBase Other) const
Intersect with other MemoryEffectsBase.
Definition ModRef.h:292
static MemoryEffectsBase readOnly()
Create MemoryEffectsBase that can read any memory.
Definition ModRef.h:133
bool onlyWritesMemory() const
Whether this function only (at most) writes memory.
Definition ModRef.h:252
static MemoryEffectsBase inaccessibleOrArgOrErrnoMemOnly(ModRefInfo InaccessibleOrArgMR=ModRefInfo::ModRef, ModRefInfo ErrnoMR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access inaccessible, argument or errno memory.
Definition ModRef.h:186
MemoryEffectsBase getWithoutLoc(Location Loc) const
Get new MemoryEffectsBase with NoModRef on the given Loc.
Definition ModRef.h:231
MemoryEffectsBase & operator|=(MemoryEffectsBase Other)
Union (in-place) with other MemoryEffectsBase.
Definition ModRef.h:308
MemoryEffectsBase getWithModRef(Location Loc, ModRefInfo MR) const
Get new MemoryEffectsBase with modified ModRefInfo for Loc.
Definition ModRef.h:224
static auto targetMemLocations()
Definition ModRef.h:106
bool operator!=(MemoryEffectsBase Other) const
Check whether this is different from other MemoryEffectsBase.
Definition ModRef.h:328
MemoryEffectsBase operator-(MemoryEffectsBase Other) const
Subtract other MemoryEffectsBase.
Definition ModRef.h:314
bool doesNotAccessMemory() const
Whether this function accesses no memory.
Definition ModRef.h:246
static MemoryEffectsBase argMemOnly(ModRefInfo MR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access argument memory.
Definition ModRef.h:143
MemoryEffectsBase(ModRefInfo MR)
Create MemoryEffectsBase that can access any location with the given ModRefInfo.
Definition ModRef.h:117
bool doesAccessArgPointees() const
Whether this function may access argument memory.
Definition ModRef.h:260
static MemoryEffectsBase inaccessibleMemOnly(ModRefInfo MR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access inaccessible memory.
Definition ModRef.h:149
bool onlyAccessesInaccessibleMem() const
Whether this function only (at most) accesses inaccessible memory.
Definition ModRef.h:265
MemoryEffectsBase(Location Loc, ModRefInfo MR)
Create MemoryEffectsBase that can access only the given location with the given ModRefInfo.
Definition ModRef.h:113
ModRefInfo getModRef(Location Loc) const
Get ModRefInfo for the given Location.
Definition ModRef.h:219
MemoryEffectsBase & operator&=(MemoryEffectsBase Other)
Intersect (in-place) with other MemoryEffectsBase.
Definition ModRef.h:297
ModRefInfo getModRef() const
Get ModRefInfo for any location.
Definition ModRef.h:238
LocationEnum Location
Definition ModRef.h:80
bool onlyAccessesArgPointees() const
Whether this function only (at most) accesses argument memory.
Definition ModRef.h:255
bool onlyReadsMemory() const
Whether this function only (at most) reads memory.
Definition ModRef.h:249
static MemoryEffectsBase errnoMemOnly(ModRefInfo MR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access errno memory.
Definition ModRef.h:154
static MemoryEffectsBase createFromIntValue(uint32_t Data)
Create MemoryEffectsBase from an encoded integer value (used by memory attribute).
Definition ModRef.h:208
MemoryEffectsBase & operator-=(MemoryEffectsBase Other)
Subtract (in-place) with other MemoryEffectsBase.
Definition ModRef.h:319
static MemoryEffectsBase writeOnly()
Create MemoryEffectsBase that can write any memory.
Definition ModRef.h:138
MemoryEffectsBase operator|(MemoryEffectsBase Other) const
Union with other MemoryEffectsBase.
Definition ModRef.h:303
static MemoryEffectsBase otherMemOnly(ModRefInfo MR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access other memory.
Definition ModRef.h:159
static auto locations()
Returns iterator over all supported location kinds.
Definition ModRef.h:101
bool onlyAccessesErrnoMem() const
Whether this function only (at most) accesses errno memory.
Definition ModRef.h:279
uint32_t toIntValue() const
Convert MemoryEffectsBase into an encoded integer value (used by memory attribute).
Definition ModRef.h:214
static MemoryEffectsBase inaccessibleOrArgMemOnly(ModRefInfo MR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access inaccessible or argument memory.
Definition ModRef.h:166
static MemoryEffectsBase argumentOrErrnoMemOnly(ModRefInfo ArgMR=ModRefInfo::ModRef, ModRefInfo ErrnoMR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access argument or errno memory.
Definition ModRef.h:198
static MemoryEffectsBase inaccessibleOrErrnoMemOnly(ModRefInfo InaccessibleMR=ModRefInfo::ModRef, ModRefInfo ErrnoMR=ModRefInfo::ModRef)
Create MemoryEffectsBase that can only access inaccessible or errno memory.
Definition ModRef.h:176
bool onlyAccessesInaccessibleOrTargetMem() const
Whether this function only (at most) accesses inaccessible or target memory.
Definition ModRef.h:271
static MemoryEffectsBase none()
Create MemoryEffectsBase that cannot read or write any memory.
Definition ModRef.h:128
bool operator==(MemoryEffectsBase Other) const
Check whether this is the same as other MemoryEffectsBase.
Definition ModRef.h:325
bool onlyAccessesInaccessibleOrArgMem() const
Whether this function only (at most) accesses argument and inaccessible memory.
Definition ModRef.h:285
static MemoryEffectsBase unknown()
Create MemoryEffectsBase that can read and write any memory.
Definition ModRef.h:123
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
bool capturesReadProvenanceOnly(CaptureComponents CC)
Definition ModRef.h:371
bool capturesAddressIsNullOnly(CaptureComponents CC)
Definition ModRef.h:363
auto enum_seq_inclusive(EnumT Begin, EnumT End)
Iterate over an enum type from Begin to End inclusive.
Definition Sequence.h:364
bool capturesAddress(CaptureComponents CC)
Definition ModRef.h:367
constexpr force_iteration_on_noniterable_enum_t force_iteration_on_noniterable_enum
Definition Sequence.h:109
MemoryEffectsBase< IRMemLocation > MemoryEffects
Summary of how a function affects memory in the program.
Definition ModRef.h:336
MemoryEffects FunctionModRefBehavior
Definition ModRef.h:342
bool capturesFullProvenance(CaptureComponents CC)
Definition ModRef.h:376
bool isModSet(const ModRefInfo MRI)
Definition ModRef.h:49
bool isModOrRefSet(const ModRefInfo MRI)
Definition ModRef.h:43
CaptureComponents
Components of the pointer that may be captured.
Definition ModRef.h:345
ModRefInfo
Flags indicating whether a memory access modifies or references memory.
Definition ModRef.h:28
@ Ref
The access may reference the value stored in memory.
Definition ModRef.h:32
@ ModRef
The access may reference and may modify the value stored in memory.
Definition ModRef.h:36
@ Mod
The access may modify the value stored in memory.
Definition ModRef.h:34
@ NoModRef
The access neither references nor modifies the value stored in memory.
Definition ModRef.h:30
IRMemLocation
The locations at which a function might access memory.
Definition ModRef.h:60
@ ErrnoMem
Errno memory.
Definition ModRef.h:66
@ ArgMem
Access to memory via argument pointers.
Definition ModRef.h:62
@ TargetMem0
Represents target specific state.
Definition ModRef.h:70
@ Other
Any other memory.
Definition ModRef.h:68
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
Definition ModRef.h:74
@ InaccessibleMem
Memory that is inaccessible via LLVM IR.
Definition ModRef.h:64
FunctionAddr VTableAddr uintptr_t uintptr_t Data
Definition InstrProf.h:189
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
bool isModAndRefSet(const ModRefInfo MRI)
Definition ModRef.h:46
bool capturesAnything(CaptureComponents CC)
Definition ModRef.h:359
bool capturesAll(CaptureComponents CC)
Definition ModRef.h:384
bool capturesNothing(CaptureComponents CC)
Definition ModRef.h:355
bool isNoModRef(const ModRefInfo MRI)
Definition ModRef.h:40
bool capturesAnyProvenance(CaptureComponents CC)
Definition ModRef.h:380
bool isRefSet(const ModRefInfo MRI)
Definition ModRef.h:52