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 class VPlan;
48 friend struct VPIRValue;
49 friend struct VPSymbolicValue;
50 friend class VPRecipeValue;
51
52 const unsigned char SubclassID; ///< Subclass identifier (for isa/dyn_cast).
53
55
56 /// Hold the underlying Value, if any, attached to this VPValue.
57 Value *UnderlyingVal;
58
59 VPValue(const unsigned char SC, Value *UV = nullptr)
60 : SubclassID(SC), UnderlyingVal(UV) {}
61
62 // DESIGN PRINCIPLE: Access to the underlying IR must be strictly limited to
63 // the front-end and back-end of VPlan so that the middle-end is as
64 // independent as possible of the underlying IR. We grant access to the
65 // underlying IR using friendship. In that way, we should be able to use VPlan
66 // for multiple underlying IRs (Polly?) by providing a new VPlan front-end,
67 // back-end and analysis information for the new IR.
68
69public:
70 /// Return the underlying Value attached to this VPValue.
71 Value *getUnderlyingValue() const { return UnderlyingVal; }
72
73 /// Return the underlying IR value for a VPIRValue.
74 Value *getLiveInIRValue() const;
75
76 /// An enumeration for keeping track of the concrete subclass of VPValue that
77 /// are actually instantiated.
78 enum {
79 VPVIRValueSC, /// A live-in VPValue wrapping an IR Value.
80 VPVSymbolicSC, /// A symbolic live-in VPValue without IR backing.
81 VPVRecipeValueSC, /// A VPValue defined by a recipe.
82 };
83
84 VPValue(const VPValue &) = delete;
85 VPValue &operator=(const VPValue &) = delete;
86
87 virtual ~VPValue() {
88 assert(Users.empty() && "trying to delete a VPValue with remaining users");
89 }
90
91 /// \return an ID for the concrete type of this object.
92 /// This is used to implement the classof checks. This should not be used
93 /// for any other purpose, as the values may change as LLVM evolves.
94 unsigned getVPValueID() const { return SubclassID; }
95
96#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
97 void printAsOperand(raw_ostream &OS, VPSlotTracker &Tracker) const;
98 void print(raw_ostream &OS, VPSlotTracker &Tracker) const;
99
100 /// Dump the value to stderr (for debugging).
101 void dump() const;
102#endif
103
104 unsigned getNumUsers() const { return Users.size(); }
105 void addUser(VPUser &User) { Users.push_back(&User); }
106
107 /// Remove a single \p User from the list of users.
109 // The same user can be added multiple times, e.g. because the same VPValue
110 // is used twice by the same VPUser. Remove a single one.
111 auto *I = find(Users, &User);
112 if (I != Users.end())
113 Users.erase(I);
114 }
115
120
121 user_iterator user_begin() { return Users.begin(); }
122 const_user_iterator user_begin() const { return Users.begin(); }
123 user_iterator user_end() { return Users.end(); }
124 const_user_iterator user_end() const { return Users.end(); }
128 }
129
130 /// Returns true if the value has more than one unique user.
132 if (getNumUsers() == 0)
133 return false;
134
135 // Check if all users match the first user.
136 auto Current = std::next(user_begin());
137 while (Current != user_end() && *user_begin() == *Current)
138 Current++;
139 return Current != user_end();
140 }
141
142 bool hasOneUse() const { return getNumUsers() == 1; }
143
144 /// Return the single user of this value, or nullptr if there is not exactly
145 /// one user.
146 VPUser *getSingleUser() { return hasOneUse() ? *user_begin() : nullptr; }
147 const VPUser *getSingleUser() const {
148 return hasOneUse() ? *user_begin() : nullptr;
149 }
150
151 void replaceAllUsesWith(VPValue *New);
152
153 /// Go through the uses list for this VPValue and make each use point to \p
154 /// New if the callback ShouldReplace returns true for the given use specified
155 /// by a pair of (VPUser, the use index).
156 void replaceUsesWithIf(
157 VPValue *New,
158 llvm::function_ref<bool(VPUser &U, unsigned Idx)> ShouldReplace);
159
160 /// Returns the recipe defining this VPValue or nullptr if it is not defined
161 /// by a recipe, i.e. is a live-in.
162 VPRecipeBase *getDefiningRecipe();
163 const VPRecipeBase *getDefiningRecipe() const;
164
165 /// Returns true if this VPValue is defined by a recipe.
166 bool hasDefiningRecipe() const { return getDefiningRecipe(); }
167
168 /// Returns true if the VPValue is defined outside any loop.
169 bool isDefinedOutsideLoopRegions() const;
170
171 // Set \p Val as the underlying Value of this VPValue.
173 assert(!UnderlyingVal && "Underlying Value is already set.");
174 UnderlyingVal = Val;
175 }
176};
177
178LLVM_ABI_FOR_TEST raw_ostream &operator<<(raw_ostream &OS,
179 const VPRecipeBase &R);
180
181/// A VPValue representing a live-in from the input IR or a constant. It wraps
182/// an underlying IR Value.
183struct VPIRValue : public VPValue {
184 VPIRValue(Value *UV) : VPValue(VPVIRValueSC, UV) {
185 assert(UV && "VPIRValue requires an underlying IR value");
186 }
187
188 /// Returns the underlying IR value.
189 Value *getValue() const { return getUnderlyingValue(); }
190
191 /// Returns the type of the underlying IR value.
192 Type *getType() const;
193
194 static bool classof(const VPValue *V) {
195 return V->getVPValueID() == VPVIRValueSC;
196 }
197};
198
199/// An overlay on VPIRValue for VPValues that wrap a ConstantInt. Provides
200/// convenient accessors for the underlying constant.
201struct VPConstantInt : public VPIRValue {
203
204 static bool classof(const VPValue *V) {
205 return isa<VPIRValue>(V) && isa<ConstantInt>(V->getUnderlyingValue());
206 }
207
208 bool isOne() const { return getAPInt().isOne(); }
209
210 bool isZero() const { return getAPInt().isZero(); }
211
212 const APInt &getAPInt() const {
213 return cast<ConstantInt>(getValue())->getValue();
214 }
215
216 unsigned getBitWidth() const { return getAPInt().getBitWidth(); }
217
219};
220
221/// A symbolic live-in VPValue, used for values like vector trip count, VF, and
222/// VFxUF.
223struct VPSymbolicValue : public VPValue {
224 VPSymbolicValue() : VPValue(VPVSymbolicSC, nullptr) {}
225
226 static bool classof(const VPValue *V) {
227 return V->getVPValueID() == VPVSymbolicSC;
228 }
229};
230
231/// A VPValue defined by a recipe that produces one or more values.
232class VPRecipeValue : public VPValue {
233 friend class VPValue;
234 friend class VPDef;
235
236 /// Pointer to the VPRecipeBase that defines this VPValue.
237 VPRecipeBase *Def;
238
239#if !defined(NDEBUG)
240 /// Returns true if this VPRecipeValue is defined by \p D.
241 /// NOTE: Only used by VPDef to assert that VPRecipeValues added/removed from
242 /// /p D are associated with its VPRecipeBase,
243 bool isDefinedBy(const VPDef *D) const;
244#endif
245
246public:
248
250
251 static bool classof(const VPValue *V) {
252 return V->getVPValueID() == VPVRecipeValueSC;
253 }
254};
255
256/// This class augments VPValue with operands which provide the inverse def-use
257/// edges from VPValue's users to their defs.
258class VPUser {
259 /// Grant access to removeOperand for VPPhiAccessors, the only supported user.
260 friend class VPPhiAccessors;
261
263
264 /// Removes the operand at index \p Idx. This also removes the VPUser from the
265 /// use-list of the operand.
266 void removeOperand(unsigned Idx) {
267 getOperand(Idx)->removeUser(*this);
268 Operands.erase(Operands.begin() + Idx);
269 }
270
271protected:
272#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
273 /// Print the operands to \p O.
275#endif
276
278 for (VPValue *Operand : Operands)
279 addOperand(Operand);
280 }
281
282public:
283 VPUser() = delete;
284 VPUser(const VPUser &) = delete;
285 VPUser &operator=(const VPUser &) = delete;
286 virtual ~VPUser() {
287 for (VPValue *Op : operands())
288 Op->removeUser(*this);
289 }
290
291 void addOperand(VPValue *Operand) {
292 Operands.push_back(Operand);
293 Operand->addUser(*this);
294 }
295
296 unsigned getNumOperands() const { return Operands.size(); }
297 inline VPValue *getOperand(unsigned N) const {
298 assert(N < Operands.size() && "Operand index out of bounds");
299 return Operands[N];
300 }
301
302 void setOperand(unsigned I, VPValue *New) {
303 Operands[I]->removeUser(*this);
304 Operands[I] = New;
305 New->addUser(*this);
306 }
307
308 /// Swap operands of the VPUser. It must have exactly 2 operands.
310 assert(Operands.size() == 2 && "must have 2 operands to swap");
311 std::swap(Operands[0], Operands[1]);
312 }
313
314 /// Replaces all uses of \p From in the VPUser with \p To.
315 void replaceUsesOfWith(VPValue *From, VPValue *To);
316
321
322 operand_iterator op_begin() { return Operands.begin(); }
323 const_operand_iterator op_begin() const { return Operands.begin(); }
324 operand_iterator op_end() { return Operands.end(); }
325 const_operand_iterator op_end() const { return Operands.end(); }
330
331 /// Returns true if the VPUser uses scalars of operand \p Op. Conservatively
332 /// returns if only first (scalar) lane is used, as default.
333 virtual bool usesScalars(const VPValue *Op) const {
335 "Op must be an operand of the recipe");
336 return usesFirstLaneOnly(Op);
337 }
338
339 /// Returns true if the VPUser only uses the first lane of operand \p Op.
340 /// Conservatively returns false.
341 virtual bool usesFirstLaneOnly(const VPValue *Op) const {
343 "Op must be an operand of the recipe");
344 return false;
345 }
346
347 /// Returns true if the VPUser only uses the first part of operand \p Op.
348 /// Conservatively returns false.
349 virtual bool usesFirstPartOnly(const VPValue *Op) const {
351 "Op must be an operand of the recipe");
352 return false;
353 }
354};
355
356/// This class augments a recipe with a set of VPValues defined by the recipe.
357/// It allows recipes to define zero, one or multiple VPValues. A VPDef owns
358/// the VPValues it defines and is responsible for deleting its defined values.
359/// Single-value VPDefs that also inherit from VPValue must make sure to inherit
360/// from VPDef before VPValue.
361class VPDef {
362 friend class VPRecipeValue;
363
364 /// The VPValues defined by this VPDef.
365 TinyPtrVector<VPRecipeValue *> DefinedValues;
366
367 /// Add \p V as a defined value by this VPDef.
368 void addDefinedValue(VPRecipeValue *V) {
369 assert(V->isDefinedBy(this) &&
370 "can only add VPValue already linked with this VPDef");
371 DefinedValues.push_back(V);
372 }
373
374 /// Remove \p V from the values defined by this VPDef. \p V must be a defined
375 /// value of this VPDef.
376 void removeDefinedValue(VPRecipeValue *V) {
377 assert(V->isDefinedBy(this) &&
378 "can only remove VPValue linked with this VPDef");
379 assert(is_contained(DefinedValues, V) &&
380 "VPValue to remove must be in DefinedValues");
381 llvm::erase(DefinedValues, V);
382 V->Def = nullptr;
383 }
384
385public:
386 VPDef() {}
387
388 virtual ~VPDef() {
389 for (VPRecipeValue *D : to_vector(DefinedValues)) {
390 assert(D->isDefinedBy(this) &&
391 "all defined VPValues should point to the containing VPDef");
392 assert(D->getNumUsers() == 0 &&
393 "all defined VPValues should have no more users");
394 delete D;
395 }
396 }
397
398 /// Returns the only VPValue defined by the VPDef. Can only be called for
399 /// VPDefs with a single defined value.
401 assert(DefinedValues.size() == 1 && "must have exactly one defined value");
402 assert(DefinedValues[0] && "defined value must be non-null");
403 return DefinedValues[0];
404 }
405 const VPValue *getVPSingleValue() const {
406 assert(DefinedValues.size() == 1 && "must have exactly one defined value");
407 assert(DefinedValues[0] && "defined value must be non-null");
408 return DefinedValues[0];
409 }
410
411 /// Returns the VPValue with index \p I defined by the VPDef.
412 VPValue *getVPValue(unsigned I) {
413 assert(DefinedValues[I] && "defined value must be non-null");
414 return DefinedValues[I];
415 }
416 const VPValue *getVPValue(unsigned I) const {
417 assert(DefinedValues[I] && "defined value must be non-null");
418 return DefinedValues[I];
419 }
420
421 /// Returns an ArrayRef of the values defined by the VPDef.
422 ArrayRef<VPRecipeValue *> definedValues() { return DefinedValues; }
423 /// Returns an ArrayRef of the values defined by the VPDef.
424 ArrayRef<VPRecipeValue *> definedValues() const { return DefinedValues; }
425
426 /// Returns the number of values defined by the VPDef.
427 unsigned getNumDefinedValues() const { return DefinedValues.size(); }
428};
429
430} // namespace llvm
431
432#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:1549
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:1497
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:45
This class augments a recipe with a set of VPValues defined by the recipe.
Definition VPlanValue.h:361
unsigned getNumDefinedValues() const
Returns the number of values defined by the VPDef.
Definition VPlanValue.h:427
virtual ~VPDef()
Definition VPlanValue.h:388
friend class VPRecipeValue
Definition VPlanValue.h:362
VPValue * getVPSingleValue()
Returns the only VPValue defined by the VPDef.
Definition VPlanValue.h:400
const VPValue * getVPSingleValue() const
Definition VPlanValue.h:405
VPValue * getVPValue(unsigned I)
Returns the VPValue with index I defined by the VPDef.
Definition VPlanValue.h:412
ArrayRef< VPRecipeValue * > definedValues() const
Returns an ArrayRef of the values defined by the VPDef.
Definition VPlanValue.h:424
ArrayRef< VPRecipeValue * > definedValues()
Returns an ArrayRef of the values defined by the VPDef.
Definition VPlanValue.h:422
const VPValue * getVPValue(unsigned I) const
Definition VPlanValue.h:416
Helper type to provide functions to access incoming values and blocks for phi-like recipes.
Definition VPlan.h:1439
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
Definition VPlan.h:387
A VPValue defined by a recipe that produces one or more values.
Definition VPlanValue.h:232
virtual LLVM_ABI_FOR_TEST ~VPRecipeValue()
Definition VPlan.cpp:147
LLVM_ABI_FOR_TEST VPRecipeValue(VPRecipeBase *Def, Value *UV=nullptr)
Definition VPlan.cpp:141
friend class VPDef
Definition VPlanValue.h:234
friend class VPValue
Definition VPlanValue.h:233
static bool classof(const VPValue *V)
Definition VPlanValue.h:251
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:258
void replaceUsesOfWith(VPValue *From, VPValue *To)
Replaces all uses of From in the VPUser with To.
Definition VPlan.cpp:1425
void printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const
Print the operands to O.
Definition VPlan.cpp:1437
operand_range operands()
Definition VPlanValue.h:326
void setOperand(unsigned I, VPValue *New)
Definition VPlanValue.h:302
VPUser & operator=(const VPUser &)=delete
friend class VPPhiAccessors
Grant access to removeOperand for VPPhiAccessors, the only supported user.
Definition VPlanValue.h:260
unsigned getNumOperands() const
Definition VPlanValue.h:296
SmallVectorImpl< VPValue * >::const_iterator const_operand_iterator
Definition VPlanValue.h:318
const_operand_iterator op_begin() const
Definition VPlanValue.h:323
operand_iterator op_end()
Definition VPlanValue.h:324
const_operand_range operands() const
Definition VPlanValue.h:327
operand_iterator op_begin()
Definition VPlanValue.h:322
VPValue * getOperand(unsigned N) const
Definition VPlanValue.h:297
VPUser(ArrayRef< VPValue * > Operands)
Definition VPlanValue.h:277
VPUser(const VPUser &)=delete
VPUser()=delete
iterator_range< const_operand_iterator > const_operand_range
Definition VPlanValue.h:320
virtual bool usesFirstPartOnly(const VPValue *Op) const
Returns true if the VPUser only uses the first part of operand Op.
Definition VPlanValue.h:349
void swapOperands()
Swap operands of the VPUser. It must have exactly 2 operands.
Definition VPlanValue.h:309
SmallVectorImpl< VPValue * >::iterator operand_iterator
Definition VPlanValue.h:317
virtual ~VPUser()
Definition VPlanValue.h:286
virtual bool usesFirstLaneOnly(const VPValue *Op) const
Returns true if the VPUser only uses the first lane of operand Op.
Definition VPlanValue.h:341
const_operand_iterator op_end() const
Definition VPlanValue.h:325
virtual bool usesScalars(const VPValue *Op) const
Returns true if the VPUser uses scalars of operand Op.
Definition VPlanValue.h:333
iterator_range< operand_iterator > operand_range
Definition VPlanValue.h:319
void addOperand(VPValue *Operand)
Definition VPlanValue.h:291
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:166
virtual ~VPValue()
Definition VPlanValue.h:87
unsigned getVPValueID() const
Definition VPlanValue.h:94
VPRecipeBase * getDefiningRecipe()
Returns the recipe defining this VPValue or nullptr if it is not defined by a recipe,...
Definition VPlan.cpp:125
void removeUser(VPUser &User)
Remove a single User from the list of users.
Definition VPlanValue.h:108
SmallVectorImpl< VPUser * >::const_iterator const_user_iterator
Definition VPlanValue.h:117
friend class VPRecipeValue
Definition VPlanValue.h:50
const_user_iterator user_begin() const
Definition VPlanValue.h:122
friend struct VPIRValue
Definition VPlanValue.h:48
void addUser(VPUser &User)
Definition VPlanValue.h:105
bool hasMoreThanOneUniqueUser() const
Returns true if the value has more than one unique user.
Definition VPlanValue.h:131
Value * getUnderlyingValue() const
Return the underlying Value attached to this VPValue.
Definition VPlanValue.h:71
const_user_range users() const
Definition VPlanValue.h:126
VPValue(const VPValue &)=delete
VPValue & operator=(const VPValue &)=delete
@ VPVSymbolicSC
A live-in VPValue wrapping an IR Value.
Definition VPlanValue.h:80
@ VPVRecipeValueSC
A symbolic live-in VPValue without IR backing.
Definition VPlanValue.h:81
bool hasOneUse() const
Definition VPlanValue.h:142
const VPUser * getSingleUser() const
Definition VPlanValue.h:147
void setUnderlyingValue(Value *Val)
Definition VPlanValue.h:172
SmallVectorImpl< VPUser * >::iterator user_iterator
Definition VPlanValue.h:116
iterator_range< user_iterator > user_range
Definition VPlanValue.h:118
const_user_iterator user_end() const
Definition VPlanValue.h:124
VPUser * getSingleUser()
Return the single user of this value, or nullptr if there is not exactly one user.
Definition VPlanValue.h:146
user_iterator user_begin()
Definition VPlanValue.h:121
unsigned getNumUsers() const
Definition VPlanValue.h:104
friend struct VPSymbolicValue
Definition VPlanValue.h:49
user_iterator user_end()
Definition VPlanValue.h:123
user_range users()
Definition VPlanValue.h:125
iterator_range< const_user_iterator > const_user_range
Definition VPlanValue.h:119
friend class VPlan
Definition VPlanValue.h:47
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:2190
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:1945
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:202
static bool classof(const VPValue *V)
Definition VPlanValue.h:204
bool isZero() const
Definition VPlanValue.h:210
const APInt & getAPInt() const
Definition VPlanValue.h:212
uint64_t getZExtValue() const
Definition VPlanValue.h:218
unsigned getBitWidth() const
Definition VPlanValue.h:216
bool isOne() const
Definition VPlanValue.h:208
VPIRValue(Value *UV)
Definition VPlanValue.h:184
Value * getValue() const
Returns the underlying IR value.
Definition VPlanValue.h:189
static bool classof(const VPValue *V)
Definition VPlanValue.h:194
Type * getType() const
Returns the type of the underlying IR value.
Definition VPlan.cpp:139
static bool classof(const VPValue *V)
Definition VPlanValue.h:226