LLVM 23.0.0git
VPlanValue.h
Go to the documentation of this file.
1//===- VPlanValue.h - Represent Values in Vectorizer Plan -----------------===//
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/// \file
10/// This file contains the declarations of the entities induced by Vectorization
11/// Plans, e.g. the instructions the VPlan intends to generate if executed.
12/// VPlan models the following entities:
13/// VPValue VPUser VPDef
14/// | |
15/// VPInstruction
16/// These are documented in docs/VectorizationPlan.rst.
17///
18//===----------------------------------------------------------------------===//
19
20#ifndef LLVM_TRANSFORMS_VECTORIZE_VPLAN_VALUE_H
21#define LLVM_TRANSFORMS_VECTORIZE_VPLAN_VALUE_H
22
23#include "llvm/ADT/STLExtras.h"
27#include "llvm/IR/Constants.h"
30
31namespace llvm {
32
33// Forward declarations.
34class raw_ostream;
35class Type;
36class Value;
37class VPDef;
38class VPSlotTracker;
39class VPUser;
40class VPRecipeBase;
41class VPPhiAccessors;
42
43/// This is the base class of the VPlan Def/Use graph, used for modeling the
44/// data flow into, within and out of the VPlan. VPValues can stand for live-ins
45/// coming from the input IR, symbolic values and values defined by recipes.
46class LLVM_ABI_FOR_TEST VPValue {
47 friend struct VPIRValue;
48 friend struct VPSymbolicValue;
49 friend class VPRecipeValue;
50
51 const unsigned char SubclassID; ///< Subclass identifier (for isa/dyn_cast).
52
54
55 /// Hold the underlying Value, if any, attached to this VPValue.
56 Value *UnderlyingVal;
57
58 VPValue(const unsigned char SC, Value *UV = nullptr)
59 : SubclassID(SC), UnderlyingVal(UV) {}
60
61 // DESIGN PRINCIPLE: Access to the underlying IR must be strictly limited to
62 // the front-end and back-end of VPlan so that the middle-end is as
63 // independent as possible of the underlying IR. We grant access to the
64 // underlying IR using friendship. In that way, we should be able to use VPlan
65 // for multiple underlying IRs (Polly?) by providing a new VPlan front-end,
66 // back-end and analysis information for the new IR.
67
68public:
69 /// Return the underlying Value attached to this VPValue.
70 Value *getUnderlyingValue() const { return UnderlyingVal; }
71
72 /// Return the underlying IR value for a VPIRValue.
73 Value *getLiveInIRValue() const;
74
75 /// An enumeration for keeping track of the concrete subclass of VPValue that
76 /// are actually instantiated.
77 enum {
78 VPVIRValueSC, /// A live-in VPValue wrapping an IR Value.
79 VPVSymbolicSC, /// A symbolic live-in VPValue without IR backing.
80 VPVRecipeValueSC, /// A VPValue defined by a recipe.
81 };
82
83 VPValue(const VPValue &) = delete;
84 VPValue &operator=(const VPValue &) = delete;
85
86 virtual ~VPValue() {
87 assert(Users.empty() && "trying to delete a VPValue with remaining users");
88 }
89
90 /// \return an ID for the concrete type of this object.
91 /// This is used to implement the classof checks. This should not be used
92 /// for any other purpose, as the values may change as LLVM evolves.
93 unsigned getVPValueID() const { return SubclassID; }
94
95#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
96 void printAsOperand(raw_ostream &OS, VPSlotTracker &Tracker) const;
97 void print(raw_ostream &OS, VPSlotTracker &Tracker) const;
98
99 /// Dump the value to stderr (for debugging).
100 void dump() const;
101#endif
102
103 /// Assert that this VPValue has not been materialized, if it is a
104 /// VPSymbolicValue.
105 void assertNotMaterialized() const;
106
107 unsigned getNumUsers() const {
108 if (Users.empty())
109 return 0;
111 return Users.size();
112 }
115 Users.push_back(&User);
116 }
117
118 /// Remove a single \p User from the list of users.
121 // The same user can be added multiple times, e.g. because the same VPValue
122 // is used twice by the same VPUser. Remove a single one.
123 auto *I = find(Users, &User);
124 if (I != Users.end())
125 Users.erase(I);
126 }
127
132
135 return Users.begin();
136 }
139 return Users.begin();
140 }
143 return Users.end();
144 }
147 return Users.end();
148 }
152 }
153
154 /// Returns true if the value has more than one unique user.
156 if (getNumUsers() == 0)
157 return false;
158
159 // Check if all users match the first user.
160 auto Current = std::next(user_begin());
161 while (Current != user_end() && *user_begin() == *Current)
162 Current++;
163 return Current != user_end();
164 }
165
166 bool hasOneUse() const { return getNumUsers() == 1; }
167
168 /// Return the single user of this value, or nullptr if there is not exactly
169 /// one user.
170 VPUser *getSingleUser() { return hasOneUse() ? *user_begin() : nullptr; }
171 const VPUser *getSingleUser() const {
172 return hasOneUse() ? *user_begin() : nullptr;
173 }
174
175 void replaceAllUsesWith(VPValue *New);
176
177 /// Go through the uses list for this VPValue and make each use point to \p
178 /// New if the callback ShouldReplace returns true for the given use specified
179 /// by a pair of (VPUser, the use index).
180 void replaceUsesWithIf(
181 VPValue *New,
182 llvm::function_ref<bool(VPUser &U, unsigned Idx)> ShouldReplace);
183
184 /// Returns the recipe defining this VPValue or nullptr if it is not defined
185 /// by a recipe, i.e. is a live-in.
186 VPRecipeBase *getDefiningRecipe();
187 const VPRecipeBase *getDefiningRecipe() const;
188
189 /// Returns true if this VPValue is defined by a recipe.
190 bool hasDefiningRecipe() const { return getDefiningRecipe(); }
191
192 /// Returns true if the VPValue is defined outside any loop.
193 bool isDefinedOutsideLoopRegions() const;
194
195 // Set \p Val as the underlying Value of this VPValue.
197 assert(!UnderlyingVal && "Underlying Value is already set.");
198 UnderlyingVal = Val;
199 }
200};
201
202LLVM_ABI_FOR_TEST raw_ostream &operator<<(raw_ostream &OS,
203 const VPRecipeBase &R);
204
205/// A VPValue representing a live-in from the input IR or a constant. It wraps
206/// an underlying IR Value.
207struct VPIRValue : public VPValue {
208 VPIRValue(Value *UV) : VPValue(VPVIRValueSC, UV) {
209 assert(UV && "VPIRValue requires an underlying IR value");
210 }
211
212 /// Returns the underlying IR value.
213 Value *getValue() const { return getUnderlyingValue(); }
214
215 /// Returns the type of the underlying IR value.
216 Type *getType() const;
217
218 static bool classof(const VPValue *V) {
219 return V->getVPValueID() == VPVIRValueSC;
220 }
221};
222
223/// An overlay on VPIRValue for VPValues that wrap a ConstantInt. Provides
224/// convenient accessors for the underlying constant.
225struct VPConstantInt : public VPIRValue {
227
228 static bool classof(const VPValue *V) {
229 return isa<VPIRValue>(V) && isa<ConstantInt>(V->getUnderlyingValue());
230 }
231
232 bool isOne() const { return getAPInt().isOne(); }
233
234 bool isZero() const { return getAPInt().isZero(); }
235
236 const APInt &getAPInt() const {
237 return cast<ConstantInt>(getValue())->getValue();
238 }
239
240 unsigned getBitWidth() const { return getAPInt().getBitWidth(); }
241
243};
244
245/// A symbolic live-in VPValue, used for values like vector trip count, VF, and
246/// VFxUF.
247struct VPSymbolicValue : public VPValue {
248 VPSymbolicValue() : VPValue(VPVSymbolicSC, nullptr) {}
249
250 static bool classof(const VPValue *V) {
251 return V->getVPValueID() == VPVSymbolicSC;
252 }
253
254 /// Returns true if this symbolic value has been materialized.
255 bool isMaterialized() const { return Materialized; }
256
257 /// Mark this symbolic value as materialized.
259 assert(!Materialized && "VPSymbolicValue already materialized");
260 Materialized = true;
261 }
262
263private:
264 /// Track whether this symbolic value has been materialized (replaced).
265 /// After materialization, accessing users should trigger an assertion.
266 bool Materialized = false;
267};
268
269/// A VPValue defined by a recipe that produces one or more values.
270class VPRecipeValue : public VPValue {
271 friend class VPValue;
272 friend class VPDef;
273
274 /// Pointer to the VPRecipeBase that defines this VPValue.
275 VPRecipeBase *Def;
276
277#if !defined(NDEBUG)
278 /// Returns true if this VPRecipeValue is defined by \p D.
279 /// NOTE: Only used by VPDef to assert that VPRecipeValues added/removed from
280 /// /p D are associated with its VPRecipeBase,
281 bool isDefinedBy(const VPDef *D) const;
282#endif
283
284public:
286
288
289 static bool classof(const VPValue *V) {
290 return V->getVPValueID() == VPVRecipeValueSC;
291 }
292};
293
294/// This class augments VPValue with operands which provide the inverse def-use
295/// edges from VPValue's users to their defs.
296class VPUser {
297 /// Grant access to removeOperand for VPPhiAccessors, the only supported user.
298 friend class VPPhiAccessors;
299
301
302 /// Removes the operand at index \p Idx. This also removes the VPUser from the
303 /// use-list of the operand.
304 void removeOperand(unsigned Idx) {
305 getOperand(Idx)->removeUser(*this);
306 Operands.erase(Operands.begin() + Idx);
307 }
308
309protected:
310#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
311 /// Print the operands to \p O.
313#endif
314
316 for (VPValue *Operand : Operands)
317 addOperand(Operand);
318 }
319
320public:
321 VPUser() = delete;
322 VPUser(const VPUser &) = delete;
323 VPUser &operator=(const VPUser &) = delete;
324 virtual ~VPUser() {
325 for (VPValue *Op : operands())
326 Op->removeUser(*this);
327 }
328
329 void addOperand(VPValue *Operand) {
330 Operands.push_back(Operand);
331 Operand->addUser(*this);
332 }
333
334 unsigned getNumOperands() const { return Operands.size(); }
335 inline VPValue *getOperand(unsigned N) const {
336 assert(N < Operands.size() && "Operand index out of bounds");
337 return Operands[N];
338 }
339
340 void setOperand(unsigned I, VPValue *New) {
341 Operands[I]->removeUser(*this);
342 Operands[I] = New;
343 New->addUser(*this);
344 }
345
346 /// Swap operands of the VPUser. It must have exactly 2 operands.
348 assert(Operands.size() == 2 && "must have 2 operands to swap");
349 std::swap(Operands[0], Operands[1]);
350 }
351
352 /// Replaces all uses of \p From in the VPUser with \p To.
353 void replaceUsesOfWith(VPValue *From, VPValue *To);
354
359
360 operand_iterator op_begin() { return Operands.begin(); }
361 const_operand_iterator op_begin() const { return Operands.begin(); }
362 operand_iterator op_end() { return Operands.end(); }
363 const_operand_iterator op_end() const { return Operands.end(); }
368
369 /// Returns true if the VPUser uses scalars of operand \p Op. Conservatively
370 /// returns if only first (scalar) lane is used, as default.
371 virtual bool usesScalars(const VPValue *Op) const {
373 "Op must be an operand of the recipe");
374 return usesFirstLaneOnly(Op);
375 }
376
377 /// Returns true if the VPUser only uses the first lane of operand \p Op.
378 /// Conservatively returns false.
379 virtual bool usesFirstLaneOnly(const VPValue *Op) const {
381 "Op must be an operand of the recipe");
382 return false;
383 }
384
385 /// Returns true if the VPUser only uses the first part of operand \p Op.
386 /// Conservatively returns false.
387 virtual bool usesFirstPartOnly(const VPValue *Op) const {
389 "Op must be an operand of the recipe");
390 return false;
391 }
392};
393
394/// This class augments a recipe with a set of VPValues defined by the recipe.
395/// It allows recipes to define zero, one or multiple VPValues. A VPDef owns
396/// the VPValues it defines and is responsible for deleting its defined values.
397/// Single-value VPDefs that also inherit from VPValue must make sure to inherit
398/// from VPDef before VPValue.
399class VPDef {
400 friend class VPRecipeValue;
401
402 /// The VPValues defined by this VPDef.
403 TinyPtrVector<VPRecipeValue *> DefinedValues;
404
405 /// Add \p V as a defined value by this VPDef.
406 void addDefinedValue(VPRecipeValue *V) {
407 assert(V->isDefinedBy(this) &&
408 "can only add VPValue already linked with this VPDef");
409 DefinedValues.push_back(V);
410 }
411
412 /// Remove \p V from the values defined by this VPDef. \p V must be a defined
413 /// value of this VPDef.
414 void removeDefinedValue(VPRecipeValue *V) {
415 assert(V->isDefinedBy(this) &&
416 "can only remove VPValue linked with this VPDef");
417 assert(is_contained(DefinedValues, V) &&
418 "VPValue to remove must be in DefinedValues");
419 llvm::erase(DefinedValues, V);
420 V->Def = nullptr;
421 }
422
423public:
424 VPDef() {}
425
426 virtual ~VPDef() {
427 for (VPRecipeValue *D : to_vector(DefinedValues)) {
428 assert(D->isDefinedBy(this) &&
429 "all defined VPValues should point to the containing VPDef");
430 assert(D->getNumUsers() == 0 &&
431 "all defined VPValues should have no more users");
432 delete D;
433 }
434 }
435
436 /// Returns the only VPValue defined by the VPDef. Can only be called for
437 /// VPDefs with a single defined value.
439 assert(DefinedValues.size() == 1 && "must have exactly one defined value");
440 assert(DefinedValues[0] && "defined value must be non-null");
441 return DefinedValues[0];
442 }
443 const VPValue *getVPSingleValue() const {
444 assert(DefinedValues.size() == 1 && "must have exactly one defined value");
445 assert(DefinedValues[0] && "defined value must be non-null");
446 return DefinedValues[0];
447 }
448
449 /// Returns the VPValue with index \p I defined by the VPDef.
450 VPValue *getVPValue(unsigned I) {
451 assert(DefinedValues[I] && "defined value must be non-null");
452 return DefinedValues[I];
453 }
454 const VPValue *getVPValue(unsigned I) const {
455 assert(DefinedValues[I] && "defined value must be non-null");
456 return DefinedValues[I];
457 }
458
459 /// Returns an ArrayRef of the values defined by the VPDef.
460 ArrayRef<VPRecipeValue *> definedValues() { return DefinedValues; }
461 /// Returns an ArrayRef of the values defined by the VPDef.
462 ArrayRef<VPRecipeValue *> definedValues() const { return DefinedValues; }
463
464 /// Returns the number of values defined by the VPDef.
465 unsigned getNumDefinedValues() const { return DefinedValues.size(); }
466};
467
470 !cast<VPSymbolicValue>(this)->isMaterialized()) &&
471 "accessing materialized symbolic value");
472}
473
474} // namespace llvm
475
476#endif // LLVM_TRANSFORMS_VECTORIZE_VPLAN_VALUE_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static void replaceAllUsesWith(Value *Old, Value *New, SmallPtrSet< BasicBlock *, 32 > &FreshBBs, bool IsHuge)
Replace all old uses with new ones, and push the updated BBs into FreshBBs.
#define LLVM_ABI_FOR_TEST
Definition Compiler.h:218
This file contains the declarations for the subclasses of Constant, which represent the different fla...
#define I(x, y, z)
Definition MD5.cpp:57
This file contains some templates that are useful if you are working with the STL at all.
This file defines the SmallVector class.
static const BasicSubtargetSubTypeKV * find(StringRef S, ArrayRef< BasicSubtargetSubTypeKV > A)
Find KV in array using binary search.
Class for arbitrary precision integers.
Definition APInt.h:78
uint64_t getZExtValue() const
Get zero extended value.
Definition APInt.h:1555
bool isZero() const
Determine if this value is zero, i.e. all bits are clear.
Definition APInt.h:381
unsigned getBitWidth() const
Return the number of bits in the APInt.
Definition APInt.h:1503
bool isOne() const
Determine if this is a value of 1.
Definition APInt.h:390
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
This is the shared class of boolean and integer constants.
Definition Constants.h:87
This class provides computation of slot numbers for LLVM Assembly writing.
typename SuperClass::const_iterator const_iterator
typename SuperClass::iterator iterator
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
TinyPtrVector - This class is specialized for cases where there are normally 0 or 1 element in a vect...
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:46
This class augments a recipe with a set of VPValues defined by the recipe.
Definition VPlanValue.h:399
unsigned getNumDefinedValues() const
Returns the number of values defined by the VPDef.
Definition VPlanValue.h:465
virtual ~VPDef()
Definition VPlanValue.h:426
friend class VPRecipeValue
Definition VPlanValue.h:400
VPValue * getVPSingleValue()
Returns the only VPValue defined by the VPDef.
Definition VPlanValue.h:438
const VPValue * getVPSingleValue() const
Definition VPlanValue.h:443
VPValue * getVPValue(unsigned I)
Returns the VPValue with index I defined by the VPDef.
Definition VPlanValue.h:450
ArrayRef< VPRecipeValue * > definedValues() const
Returns an ArrayRef of the values defined by the VPDef.
Definition VPlanValue.h:462
ArrayRef< VPRecipeValue * > definedValues()
Returns an ArrayRef of the values defined by the VPDef.
Definition VPlanValue.h:460
const VPValue * getVPValue(unsigned I) const
Definition VPlanValue.h:454
Helper type to provide functions to access incoming values and blocks for phi-like recipes.
Definition VPlan.h:1570
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
Definition VPlan.h:406
A VPValue defined by a recipe that produces one or more values.
Definition VPlanValue.h:270
virtual LLVM_ABI_FOR_TEST ~VPRecipeValue()
Definition VPlan.cpp:149
LLVM_ABI_FOR_TEST VPRecipeValue(VPRecipeBase *Def, Value *UV=nullptr)
Definition VPlan.cpp:143
friend class VPDef
Definition VPlanValue.h:272
friend class VPValue
Definition VPlanValue.h:271
static bool classof(const VPValue *V)
Definition VPlanValue.h:289
This class can be used to assign names to VPValues.
This class augments VPValue with operands which provide the inverse def-use edges from VPValue's user...
Definition VPlanValue.h:296
void replaceUsesOfWith(VPValue *From, VPValue *To)
Replaces all uses of From in the VPUser with To.
Definition VPlan.cpp:1468
void printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const
Print the operands to O.
Definition VPlan.cpp:1480
operand_range operands()
Definition VPlanValue.h:364
void setOperand(unsigned I, VPValue *New)
Definition VPlanValue.h:340
VPUser & operator=(const VPUser &)=delete
friend class VPPhiAccessors
Grant access to removeOperand for VPPhiAccessors, the only supported user.
Definition VPlanValue.h:298
unsigned getNumOperands() const
Definition VPlanValue.h:334
SmallVectorImpl< VPValue * >::const_iterator const_operand_iterator
Definition VPlanValue.h:356
const_operand_iterator op_begin() const
Definition VPlanValue.h:361
operand_iterator op_end()
Definition VPlanValue.h:362
const_operand_range operands() const
Definition VPlanValue.h:365
operand_iterator op_begin()
Definition VPlanValue.h:360
VPValue * getOperand(unsigned N) const
Definition VPlanValue.h:335
VPUser(ArrayRef< VPValue * > Operands)
Definition VPlanValue.h:315
VPUser(const VPUser &)=delete
VPUser()=delete
iterator_range< const_operand_iterator > const_operand_range
Definition VPlanValue.h:358
virtual bool usesFirstPartOnly(const VPValue *Op) const
Returns true if the VPUser only uses the first part of operand Op.
Definition VPlanValue.h:387
void swapOperands()
Swap operands of the VPUser. It must have exactly 2 operands.
Definition VPlanValue.h:347
SmallVectorImpl< VPValue * >::iterator operand_iterator
Definition VPlanValue.h:355
virtual ~VPUser()
Definition VPlanValue.h:324
virtual bool usesFirstLaneOnly(const VPValue *Op) const
Returns true if the VPUser only uses the first lane of operand Op.
Definition VPlanValue.h:379
const_operand_iterator op_end() const
Definition VPlanValue.h:363
virtual bool usesScalars(const VPValue *Op) const
Returns true if the VPUser uses scalars of operand Op.
Definition VPlanValue.h:371
iterator_range< operand_iterator > operand_range
Definition VPlanValue.h:357
void addOperand(VPValue *Operand)
Definition VPlanValue.h:329
This is the base class of the VPlan Def/Use graph, used for modeling the data flow into,...
Definition VPlanValue.h:46
bool hasDefiningRecipe() const
Returns true if this VPValue is defined by a recipe.
Definition VPlanValue.h:190
virtual ~VPValue()
Definition VPlanValue.h:86
unsigned getVPValueID() const
Definition VPlanValue.h:93
VPRecipeBase * getDefiningRecipe()
Returns the recipe defining this VPValue or nullptr if it is not defined by a recipe,...
Definition VPlan.cpp:127
void removeUser(VPUser &User)
Remove a single User from the list of users.
Definition VPlanValue.h:119
SmallVectorImpl< VPUser * >::const_iterator const_user_iterator
Definition VPlanValue.h:129
friend class VPRecipeValue
Definition VPlanValue.h:49
const_user_iterator user_begin() const
Definition VPlanValue.h:137
void assertNotMaterialized() const
Assert that this VPValue has not been materialized, if it is a VPSymbolicValue.
Definition VPlanValue.h:468
friend struct VPIRValue
Definition VPlanValue.h:47
void addUser(VPUser &User)
Definition VPlanValue.h:113
bool hasMoreThanOneUniqueUser() const
Returns true if the value has more than one unique user.
Definition VPlanValue.h:155
Value * getUnderlyingValue() const
Return the underlying Value attached to this VPValue.
Definition VPlanValue.h:70
const_user_range users() const
Definition VPlanValue.h:150
VPValue(const VPValue &)=delete
VPValue & operator=(const VPValue &)=delete
@ VPVSymbolicSC
A live-in VPValue wrapping an IR Value.
Definition VPlanValue.h:79
@ VPVRecipeValueSC
A symbolic live-in VPValue without IR backing.
Definition VPlanValue.h:80
bool hasOneUse() const
Definition VPlanValue.h:166
const VPUser * getSingleUser() const
Definition VPlanValue.h:171
void setUnderlyingValue(Value *Val)
Definition VPlanValue.h:196
SmallVectorImpl< VPUser * >::iterator user_iterator
Definition VPlanValue.h:128
iterator_range< user_iterator > user_range
Definition VPlanValue.h:130
const_user_iterator user_end() const
Definition VPlanValue.h:145
VPUser * getSingleUser()
Return the single user of this value, or nullptr if there is not exactly one user.
Definition VPlanValue.h:170
user_iterator user_begin()
Definition VPlanValue.h:133
unsigned getNumUsers() const
Definition VPlanValue.h:107
friend struct VPSymbolicValue
Definition VPlanValue.h:48
user_iterator user_end()
Definition VPlanValue.h:141
user_range users()
Definition VPlanValue.h:149
iterator_range< const_user_iterator > const_user_range
Definition VPlanValue.h:131
LLVM Value Representation.
Definition Value.h:75
An efficient, type-erasing, non-owning reference to a callable.
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
void erase(Container &C, ValueType V)
Wrapper function to remove a value from a container:
Definition STLExtras.h:2200
SmallVector< ValueTypeFromRangeType< R >, Size > to_vector(R &&Range)
Given a range of type R, iterate the entire range and return a SmallVector with elements of the vecto...
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
Definition Casting.h:547
DWARFExpression::Operation Op
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:559
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
Definition STLExtras.h:1947
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Definition BitVector.h:872
#define N
VPConstantInt(ConstantInt *CI)
Definition VPlanValue.h:226
static bool classof(const VPValue *V)
Definition VPlanValue.h:228
bool isZero() const
Definition VPlanValue.h:234
const APInt & getAPInt() const
Definition VPlanValue.h:236
uint64_t getZExtValue() const
Definition VPlanValue.h:242
unsigned getBitWidth() const
Definition VPlanValue.h:240
bool isOne() const
Definition VPlanValue.h:232
VPIRValue(Value *UV)
Definition VPlanValue.h:208
Value * getValue() const
Returns the underlying IR value.
Definition VPlanValue.h:213
static bool classof(const VPValue *V)
Definition VPlanValue.h:218
Type * getType() const
Returns the type of the underlying IR value.
Definition VPlan.cpp:141
void markMaterialized()
Mark this symbolic value as materialized.
Definition VPlanValue.h:258
static bool classof(const VPValue *V)
Definition VPlanValue.h:250
bool isMaterialized() const
Returns true if this symbolic value has been materialized.
Definition VPlanValue.h:255