LLVM  13.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/DenseMap.h"
24 #include "llvm/ADT/STLExtras.h"
25 #include "llvm/ADT/SmallVector.h"
26 #include "llvm/ADT/TinyPtrVector.h"
28 
29 namespace llvm {
30 
31 // Forward declarations.
32 class raw_ostream;
33 class Value;
34 class VPDef;
35 class VPSlotTracker;
36 class VPUser;
37 class VPRecipeBase;
38 class VPWidenMemoryInstructionRecipe;
39 
40 // This is the base class of the VPlan Def/Use graph, used for modeling the data
41 // flow into, within and out of the VPlan. VPValues can stand for live-ins
42 // coming from the input IR, instructions which VPlan will generate if executed
43 // and live-outs which the VPlan will need to fix accordingly.
44 class VPValue {
45  friend class VPBuilder;
46  friend class VPDef;
47  friend class VPInstruction;
48  friend struct VPlanTransforms;
49  friend class VPBasicBlock;
51  friend class VPSlotTracker;
52  friend class VPRecipeBase;
54 
55  const unsigned char SubclassID; ///< Subclass identifier (for isa/dyn_cast).
56 
58 
59 protected:
60  // Hold the underlying Value, if any, attached to this VPValue.
62 
63  /// Pointer to the VPDef that defines this VPValue. If it is nullptr, the
64  /// VPValue is not defined by any recipe modeled in VPlan.
66 
67  VPValue(const unsigned char SC, Value *UV = nullptr, VPDef *Def = nullptr);
68 
69  // DESIGN PRINCIPLE: Access to the underlying IR must be strictly limited to
70  // the front-end and back-end of VPlan so that the middle-end is as
71  // independent as possible of the underlying IR. We grant access to the
72  // underlying IR using friendship. In that way, we should be able to use VPlan
73  // for multiple underlying IRs (Polly?) by providing a new VPlan front-end,
74  // back-end and analysis information for the new IR.
75 
76  // Set \p Val as the underlying Value of this VPValue.
78  assert(!UnderlyingVal && "Underlying Value is already set.");
79  UnderlyingVal = Val;
80  }
81 
82 public:
83  /// Return the underlying Value attached to this VPValue.
85  const Value *getUnderlyingValue() const { return UnderlyingVal; }
86 
87  /// An enumeration for keeping track of the concrete subclass of VPValue that
88  /// are actually instantiated. Values of this enumeration are kept in the
89  /// SubclassID field of the VPValue objects. They are used for concrete
90  /// type identification.
91  enum {
105  };
106 
107  VPValue(Value *UV = nullptr, VPDef *Def = nullptr)
108  : VPValue(VPValueSC, UV, Def) {}
109  VPValue(const VPValue &) = delete;
110  VPValue &operator=(const VPValue &) = delete;
111 
112  virtual ~VPValue();
113 
114  /// \return an ID for the concrete type of this object.
115  /// This is used to implement the classof checks. This should not be used
116  /// for any other purpose, as the values may change as LLVM evolves.
117  unsigned getVPValueID() const { return SubclassID; }
118 
119  void printAsOperand(raw_ostream &OS, VPSlotTracker &Tracker) const;
120  void print(raw_ostream &OS, VPSlotTracker &Tracker) const;
121 
122  /// Dump the value to stderr (for debugging).
123  void dump() const;
124 
125  unsigned getNumUsers() const { return Users.size(); }
126  void addUser(VPUser &User) { Users.push_back(&User); }
127 
128  /// Remove a single \p User from the list of users.
130  bool Found = false;
131  // The same user can be added multiple times, e.g. because the same VPValue
132  // is used twice by the same VPUser. Remove a single one.
133  erase_if(Users, [&User, &Found](VPUser *Other) {
134  if (Found)
135  return false;
136  if (Other == &User) {
137  Found = true;
138  return true;
139  }
140  return false;
141  });
142  }
143 
148 
149  user_iterator user_begin() { return Users.begin(); }
150  const_user_iterator user_begin() const { return Users.begin(); }
151  user_iterator user_end() { return Users.end(); }
152  const_user_iterator user_end() const { return Users.end(); }
155  return const_user_range(user_begin(), user_end());
156  }
157 
158  /// Returns true if the value has more than one unique user.
160  if (getNumUsers() == 0)
161  return false;
162 
163  // Check if all users match the first user.
164  auto Current = std::next(user_begin());
165  while (Current != user_end() && *user_begin() == *Current)
166  Current++;
167  return Current != user_end();
168  }
169 
170  void replaceAllUsesWith(VPValue *New);
171 
172  VPDef *getDef() { return Def; }
173 
174  /// Returns the underlying IR value, if this VPValue is defined outside the
175  /// scope of VPlan. Returns nullptr if the VPValue is defined by a VPDef
176  /// inside a VPlan.
178  assert(!getDef() &&
179  "VPValue is not a live-in; it is defined by a VPDef inside a VPlan");
180  return getUnderlyingValue();
181  }
182 };
183 
186 
187 raw_ostream &operator<<(raw_ostream &OS, const VPValue &V);
188 
189 /// This class augments VPValue with operands which provide the inverse def-use
190 /// edges from VPValue's users to their defs.
191 class VPUser {
192  SmallVector<VPValue *, 2> Operands;
193 
194 protected:
195  /// Print the operands to \p O.
197 
198 public:
199  VPUser() {}
201  for (VPValue *Operand : Operands)
202  addOperand(Operand);
203  }
204 
205  VPUser(std::initializer_list<VPValue *> Operands)
206  : VPUser(ArrayRef<VPValue *>(Operands)) {}
207  template <typename IterT> VPUser(iterator_range<IterT> Operands) {
208  for (VPValue *Operand : Operands)
209  addOperand(Operand);
210  }
211 
212  VPUser(const VPUser &) = delete;
213  VPUser &operator=(const VPUser &) = delete;
214  virtual ~VPUser() {
215  for (VPValue *Op : operands())
216  Op->removeUser(*this);
217  }
218 
219  void addOperand(VPValue *Operand) {
220  Operands.push_back(Operand);
221  Operand->addUser(*this);
222  }
223 
224  unsigned getNumOperands() const { return Operands.size(); }
225  inline VPValue *getOperand(unsigned N) const {
226  assert(N < Operands.size() && "Operand index out of bounds");
227  return Operands[N];
228  }
229 
230  void setOperand(unsigned I, VPValue *New) {
231  Operands[I]->removeUser(*this);
232  Operands[I] = New;
233  New->addUser(*this);
234  }
235 
237  VPValue *Op = Operands.pop_back_val();
238  Op->removeUser(*this);
239  }
240 
245 
246  operand_iterator op_begin() { return Operands.begin(); }
247  const_operand_iterator op_begin() const { return Operands.begin(); }
248  operand_iterator op_end() { return Operands.end(); }
249  const_operand_iterator op_end() const { return Operands.end(); }
252  return const_operand_range(op_begin(), op_end());
253  }
254 
255  /// Method to support type inquiry through isa, cast, and dyn_cast.
256  static inline bool classof(const VPDef *Recipe);
257 };
258 
259 /// This class augments a recipe with a set of VPValues defined by the recipe.
260 /// It allows recipes to define zero, one or multiple VPValues. A VPDef owns
261 /// the VPValues it defines and is responsible for deleting its defined values.
262 /// Single-value VPDefs that also inherit from VPValue must make sure to inherit
263 /// from VPDef before VPValue.
264 class VPDef {
265  friend class VPValue;
266 
267  /// Subclass identifier (for isa/dyn_cast).
268  const unsigned char SubclassID;
269 
270  /// The VPValues defined by this VPDef.
271  TinyPtrVector<VPValue *> DefinedValues;
272 
273  /// Add \p V as a defined value by this VPDef.
274  void addDefinedValue(VPValue *V) {
275  assert(V->getDef() == this &&
276  "can only add VPValue already linked with this VPDef");
277  DefinedValues.push_back(V);
278  }
279 
280  /// Remove \p V from the values defined by this VPDef. \p V must be a defined
281  /// value of this VPDef.
282  void removeDefinedValue(VPValue *V) {
283  assert(V->getDef() == this &&
284  "can only remove VPValue linked with this VPDef");
285  assert(is_contained(DefinedValues, V) &&
286  "VPValue to remove must be in DefinedValues");
287  erase_value(DefinedValues, V);
288  V->Def = nullptr;
289  }
290 
291 public:
292  /// An enumeration for keeping track of the concrete subclass of VPRecipeBase
293  /// that is actually instantiated. Values of this enumeration are kept in the
294  /// SubclassID field of the VPRecipeBase objects. They are used for concrete
295  /// type identification.
296  using VPRecipeTy = enum {
297  VPBlendSC,
298  VPBranchOnMaskSC,
299  VPInstructionSC,
300  VPInterleaveSC,
301  VPPredInstPHISC,
302  VPReductionSC,
303  VPReplicateSC,
304  VPWidenCallSC,
305  VPWidenCanonicalIVSC,
306  VPWidenGEPSC,
307  VPWidenIntOrFpInductionSC,
308  VPWidenMemoryInstructionSC,
309  VPWidenPHISC,
310  VPWidenSC,
311  VPWidenSelectSC
312  };
313 
314  VPDef(const unsigned char SC) : SubclassID(SC) {}
315 
316  virtual ~VPDef() {
317  for (VPValue *D : make_early_inc_range(DefinedValues)) {
318  assert(D->Def == this &&
319  "all defined VPValues should point to the containing VPDef");
320  assert(D->getNumUsers() == 0 &&
321  "all defined VPValues should have no more users");
322  D->Def = nullptr;
323  delete D;
324  }
325  }
326 
327  /// Returns the VPValue with index \p I defined by the VPDef.
328  VPValue *getVPValue(unsigned I = 0) {
329  assert(DefinedValues[I] && "defined value must be non-null");
330  return DefinedValues[I];
331  }
332  const VPValue *getVPValue(unsigned I = 0) const {
333  assert(DefinedValues[I] && "defined value must be non-null");
334  return DefinedValues[I];
335  }
336 
337  /// Returns an ArrayRef of the values defined by the VPDef.
338  ArrayRef<VPValue *> definedValues() { return DefinedValues; }
339  /// Returns an ArrayRef of the values defined by the VPDef.
340  ArrayRef<VPValue *> definedValues() const { return DefinedValues; }
341 
342  /// Returns the number of values defined by the VPDef.
343  unsigned getNumDefinedValues() const { return DefinedValues.size(); }
344 
345  /// \return an ID for the concrete type of this object.
346  /// This is used to implement the classof checks. This should not be used
347  /// for any other purpose, as the values may change as LLVM evolves.
348  unsigned getVPDefID() const { return SubclassID; }
349 
350  /// Dump the VPDef to stderr (for debugging).
351  void dump() const;
352 
353  /// Each concrete VPDef prints itself.
354  virtual void print(raw_ostream &O, const Twine &Indent,
355  VPSlotTracker &SlotTracker) const = 0;
356 };
357 
358 class VPlan;
359 class VPBasicBlock;
360 class VPRegionBlock;
361 
362 /// This class can be used to assign consecutive numbers to all VPValues in a
363 /// VPlan and allows querying the numbering for printing, similar to the
364 /// ModuleSlotTracker for IR values.
367  unsigned NextSlot = 0;
368 
369  void assignSlots(const VPBlockBase *VPBB);
370  void assignSlots(const VPRegionBlock *Region);
371  void assignSlots(const VPBasicBlock *VPBB);
372  void assignSlot(const VPValue *V);
373 
374  void assignSlots(const VPlan &Plan);
375 
376 public:
377  VPSlotTracker(const VPlan *Plan = nullptr) {
378  if (Plan)
379  assignSlots(*Plan);
380  }
381 
382  unsigned getSlot(const VPValue *V) const {
383  auto I = Slots.find(V);
384  if (I == Slots.end())
385  return -1;
386  return I->second;
387  }
388 };
389 
390 } // namespace llvm
391 
392 #endif // LLVM_TRANSFORMS_VECTORIZE_VPLAN_VALUE_H
llvm::VPUser::op_end
operand_iterator op_end()
Definition: VPlanValue.h:248
llvm
This class represents lattice values for constants.
Definition: AllocatorList.h:23
llvm::VPValue::VPVMemoryInstructionSC
@ VPVMemoryInstructionSC
Definition: VPlanValue.h:95
llvm::VPValue::user_end
const_user_iterator user_end() const
Definition: VPlanValue.h:152
llvm::VPUser::removeLastOperand
void removeLastOperand()
Definition: VPlanValue.h:236
llvm::VPBasicBlock
VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph.
Definition: VPlan.h:1297
llvm::VPValue::user_iterator
SmallVectorImpl< VPUser * >::iterator user_iterator
Definition: VPlanValue.h:144
llvm::VPValue::VPVWidenCallSC
@ VPVWidenCallSC
Definition: VPlanValue.h:100
llvm::VPValue::getLiveInIRValue
Value * getLiveInIRValue()
Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan.
Definition: VPlanValue.h:177
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1168
llvm::VPUser::VPUser
VPUser()
Definition: VPlanValue.h:199
llvm::VPInterleavedAccessInfo
Definition: VPlan.h:1910
llvm::VPDef::print
virtual void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const =0
Each concrete VPDef prints itself.
llvm::VPValue::user_range
iterator_range< user_iterator > user_range
Definition: VPlanValue.h:146
llvm::erase_if
void erase_if(Container &C, UnaryPredicate P)
Provide a container algorithm similar to C++ Library Fundamentals v2's erase_if which is equivalent t...
Definition: STLExtras.h:1667
llvm::VPValue::operator=
VPValue & operator=(const VPValue &)=delete
DenseMap.h
llvm::VPValue::dump
void dump() const
Dump the value to stderr (for debugging).
Definition: VPlan.cpp:80
llvm::VPUser::op_begin
operand_iterator op_begin()
Definition: VPlanValue.h:246
llvm::VPValue::VPVPredInstPHI
@ VPVPredInstPHI
Definition: VPlanValue.h:96
llvm::VPDef::VPDef
VPDef(const unsigned char SC)
Definition: VPlanValue.h:314
llvm::VPValue::print
void print(raw_ostream &OS, VPSlotTracker &Tracker) const
Definition: VPlan.cpp:73
STLExtras.h
llvm::VPUser::operands
operand_range operands()
Definition: VPlanValue.h:250
llvm::VPValue::VPVWidenGEPSC
@ VPVWidenGEPSC
Definition: VPlanValue.h:101
llvm::VPValue::VPValue
VPValue(const unsigned char SC, Value *UV=nullptr, VPDef *Def=nullptr)
Definition: VPlan.cpp:61
llvm::VPUser::const_operand_iterator
SmallVectorImpl< VPValue * >::const_iterator const_operand_iterator
Definition: VPlanValue.h:242
llvm::VPValue::users
user_range users()
Definition: VPlanValue.h:153
llvm::VPValue::VPVInstructionSC
@ VPVInstructionSC
Definition: VPlanValue.h:94
llvm::VPDef
This class augments a recipe with a set of VPValues defined by the recipe.
Definition: VPlanValue.h:264
llvm::VPBlockBase
VPBlockBase is the building block of the Hierarchical Control-Flow Graph.
Definition: VPlan.h:257
llvm::VPInstruction
This is a concrete Recipe that models a single VPlan-level instruction.
Definition: VPlan.h:602
llvm::VPUser::op_end
const_operand_iterator op_end() const
Definition: VPlanValue.h:249
llvm::PPCISD::SC
@ SC
CHAIN = SC CHAIN, Imm128 - System call.
Definition: PPCISelLowering.h:401
llvm::VPValue::VPVReplicateSC
@ VPVReplicateSC
Definition: VPlanValue.h:98
llvm::VPBuilder
VPlan-based builder utility analogous to IRBuilder.
Definition: LoopVectorizationPlanner.h:40
llvm::User
Definition: User.h:44
llvm::VPValue::addUser
void addUser(VPUser &User)
Definition: VPlanValue.h:126
llvm::VPDef::definedValues
ArrayRef< VPValue * > definedValues() const
Returns an ArrayRef of the values defined by the VPDef.
Definition: VPlanValue.h:340
llvm::TinyPtrVector::push_back
void push_back(EltTy NewVal)
Definition: TinyPtrVector.h:244
llvm::VPValue::VPVReductionSC
@ VPVReductionSC
Definition: VPlanValue.h:97
llvm::VPValue::replaceAllUsesWith
void replaceAllUsesWith(VPValue *New)
Definition: VPlan.cpp:1045
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:50
llvm::VPValue
Definition: VPlanValue.h:44
llvm::operator<<
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Definition: APFixedPoint.h:230
llvm::VPDef::getNumDefinedValues
unsigned getNumDefinedValues() const
Returns the number of values defined by the VPDef.
Definition: VPlanValue.h:343
llvm::VPValue::VPVWidenIntOrFpIndcutionSC
@ VPVWidenIntOrFpIndcutionSC
Definition: VPlanValue.h:102
llvm::VPValue::getUnderlyingValue
const Value * getUnderlyingValue() const
Definition: VPlanValue.h:85
llvm::VPValue::users
const_user_range users() const
Definition: VPlanValue.h:154
llvm::VPUser::getNumOperands
unsigned getNumOperands() const
Definition: VPlanValue.h:224
llvm::erase_value
void erase_value(Container &C, ValueType V)
Wrapper function to remove a value from a container:
Definition: STLExtras.h:1675
llvm::VPRegionBlock
VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-S...
Definition: VPlan.h:1387
Operands
mir Rename Register Operands
Definition: MIRNamerPass.cpp:78
llvm::VPUser::setOperand
void setOperand(unsigned I, VPValue *New)
Definition: VPlanValue.h:230
llvm::RISCVFenceField::O
@ O
Definition: RISCVBaseInfo.h:128
llvm::VPValue::Def
VPDef * Def
Pointer to the VPDef that defines this VPValue.
Definition: VPlanValue.h:65
llvm::VPSlotTracker::getSlot
unsigned getSlot(const VPValue *V) const
Definition: VPlanValue.h:382
D
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
llvm::VPUser::VPUser
VPUser(ArrayRef< VPValue * > Operands)
Definition: VPlanValue.h:200
llvm::VPValue::VPVWidenSelectSC
@ VPVWidenSelectSC
Definition: VPlanValue.h:104
llvm::VPDef::VPRecipeTy
enum { VPBlendSC, VPBranchOnMaskSC, VPInstructionSC, VPInterleaveSC, VPPredInstPHISC, VPReductionSC, VPReplicateSC, VPWidenCallSC, VPWidenCanonicalIVSC, VPWidenGEPSC, VPWidenIntOrFpInductionSC, VPWidenMemoryInstructionSC, VPWidenPHISC, VPWidenSC, VPWidenSelectSC } VPRecipeTy
An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiat...
Definition: VPlanValue.h:312
llvm::VPValue::VPValueSC
@ VPValueSC
Definition: VPlanValue.h:92
llvm::DenseMap< Value *, VPValue * >
llvm::VPValue::getNumUsers
unsigned getNumUsers() const
Definition: VPlanValue.h:125
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::make_early_inc_range
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
Definition: STLExtras.h:581
llvm::VPUser::op_begin
const_operand_iterator op_begin() const
Definition: VPlanValue.h:247
llvm::is_contained
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
Definition: STLExtras.h:1563
llvm::VPValue::user_end
user_iterator user_end()
Definition: VPlanValue.h:151
llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find
iterator find(const_arg_type_t< KeyT > Val)
Definition: DenseMap.h:150
llvm::SmallVectorImpl::const_iterator
typename SuperClass::const_iterator const_iterator
Definition: SmallVector.h:563
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::VPValue::user_begin
const_user_iterator user_begin() const
Definition: VPlanValue.h:150
iterator_range.h
llvm::Value2VPValueTy
DenseMap< Value *, VPValue * > Value2VPValueTy
Definition: VPlanValue.h:184
llvm::VPUser::printOperands
void printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const
Print the operands to O.
Definition: VPlan.cpp:1075
llvm::VPWidenMemoryInstructionRecipe
A Recipe for widening load/store operations.
Definition: VPlan.h:1209
TinyPtrVector.h
llvm::VPSlotTracker::VPSlotTracker
VPSlotTracker(const VPlan *Plan=nullptr)
Definition: VPlanValue.h:377
llvm::VPUser::VPUser
VPUser(iterator_range< IterT > Operands)
Definition: VPlanValue.h:207
llvm::VPValue::user_begin
user_iterator user_begin()
Definition: VPlanValue.h:149
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::TinyPtrVector::size
unsigned size() const
Definition: TinyPtrVector.h:172
llvm::VPUser::~VPUser
virtual ~VPUser()
Definition: VPlanValue.h:214
llvm::VPUser::addOperand
void addOperand(VPValue *Operand)
Definition: VPlanValue.h:219
llvm::VPValue::setUnderlyingValue
void setUnderlyingValue(Value *Val)
Definition: VPlanValue.h:77
llvm::VPUser::operand_range
iterator_range< operand_iterator > operand_range
Definition: VPlanValue.h:243
llvm::VPUser::operand_iterator
SmallVectorImpl< VPValue * >::iterator operand_iterator
Definition: VPlanValue.h:241
llvm::VPUser::classof
static bool classof(const VPDef *Recipe)
Method to support type inquiry through isa, cast, and dyn_cast.
Definition: VPlan.h:584
llvm::VPDef::dump
void dump() const
Dump the VPDef to stderr (for debugging).
Definition: VPlan.cpp:88
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:80
llvm::VPUser::VPUser
VPUser(std::initializer_list< VPValue * > Operands)
Definition: VPlanValue.h:205
llvm::VPSlotTracker
This class can be used to assign consecutive numbers to all VPValues in a VPlan and allows querying t...
Definition: VPlanValue.h:365
llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end
iterator end()
Definition: DenseMap.h:83
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:302
llvm::VPValue::getDef
VPDef * getDef()
Definition: VPlanValue.h:172
llvm::VPRecipeBase
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
Definition: VPlan.h:515
llvm::VPUser::operator=
VPUser & operator=(const VPUser &)=delete
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::VPValue::UnderlyingVal
Value * UnderlyingVal
Definition: VPlanValue.h:61
llvm::SlotTracker
This class provides computation of slot numbers for LLVM Assembly writing.
Definition: AsmWriter.cpp:716
llvm::VPValue::const_user_range
iterator_range< const_user_iterator > const_user_range
Definition: VPlanValue.h:147
llvm::VPValue2ValueTy
DenseMap< VPValue *, Value * > VPValue2ValueTy
Definition: VPlanValue.h:185
llvm::VPValue::hasMoreThanOneUniqueUser
bool hasMoreThanOneUniqueUser()
Returns true if the value has more than one unique user.
Definition: VPlanValue.h:159
llvm::VPDef::getVPValue
const VPValue * getVPValue(unsigned I=0) const
Definition: VPlanValue.h:332
llvm::VPUser
This class augments VPValue with operands which provide the inverse def-use edges from VPValue's user...
Definition: VPlanValue.h:191
llvm::VPlanTransforms
Definition: VPlanTransforms.h:22
llvm::VPValue::VPVWidenSC
@ VPVWidenSC
Definition: VPlanValue.h:99
SmallVector.h
llvm::SmallVectorImpl::iterator
typename SuperClass::iterator iterator
Definition: SmallVector.h:562
llvm::VPUser::getOperand
VPValue * getOperand(unsigned N) const
Definition: VPlanValue.h:225
N
#define N
Users
iv Induction Variable Users
Definition: IVUsers.cpp:52
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::VPDef::definedValues
ArrayRef< VPValue * > definedValues()
Returns an ArrayRef of the values defined by the VPDef.
Definition: VPlanValue.h:338
llvm::VPValue::getVPValueID
unsigned getVPValueID() const
Definition: VPlanValue.h:117
llvm::VPDef::~VPDef
virtual ~VPDef()
Definition: VPlanValue.h:316
llvm::VPUser::operands
const_operand_range operands() const
Definition: VPlanValue.h:251
llvm::VPValue::removeUser
void removeUser(VPUser &User)
Remove a single User from the list of users.
Definition: VPlanValue.h:129
llvm::Region
Definition: RegionInfo.h:889
llvm::VPValue::VPVBlendSC
@ VPVBlendSC
Definition: VPlanValue.h:93
llvm::VPValue::VPValue
VPValue(Value *UV=nullptr, VPDef *Def=nullptr)
Definition: VPlanValue.h:107
llvm::VPValue::~VPValue
virtual ~VPValue()
Definition: VPlan.cpp:67
llvm::TinyPtrVector
TinyPtrVector - This class is specialized for cases where there are normally 0 or 1 element in a vect...
Definition: TinyPtrVector.h:30
llvm::VPValue::VPVWidenPHISC
@ VPVWidenPHISC
Definition: VPlanValue.h:103
llvm::VPDef::getVPDefID
unsigned getVPDefID() const
Definition: VPlanValue.h:348
llvm::VPDef::getVPValue
VPValue * getVPValue(unsigned I=0)
Returns the VPValue with index I defined by the VPDef.
Definition: VPlanValue.h:328
llvm::VPValue::getUnderlyingValue
Value * getUnderlyingValue()
Return the underlying Value attached to this VPValue.
Definition: VPlanValue.h:84
llvm::VPValue::const_user_iterator
SmallVectorImpl< VPUser * >::const_iterator const_user_iterator
Definition: VPlanValue.h:145
llvm::VPlan
VPlan models a candidate for vectorization, encoding various decisions take to produce efficient outp...
Definition: VPlan.h:1593
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::VPValue::printAsOperand
void printAsOperand(raw_ostream &OS, VPSlotTracker &Tracker) const
Definition: VPlan.cpp:1060
Other
Optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1131
llvm::VPUser::const_operand_range
iterator_range< const_operand_iterator > const_operand_range
Definition: VPlanValue.h:244