26 #ifndef LLVM_TRANSFORMS_VECTORIZE_VPLAN_H 27 #define LLVM_TRANSFORMS_VECTORIZE_VPLAN_H 51 class LoopVectorizationLegality;
52 class LoopVectorizationCostModel;
55 class InnerLoopVectorizer;
56 template <
class T>
class InterleaveGroup;
124 std::map<Value *, VectorParts> VectorMapStorage;
125 std::map<Value *, ScalarParts> ScalarMapStorage;
133 return VectorMapStorage.count(Key);
138 assert(Part < UF &&
"Queried Vector Part is too large.");
139 if (!hasAnyVectorValue(Key))
141 const VectorParts &Entry = VectorMapStorage.find(Key)->second;
142 assert(Entry.
size() == UF &&
"VectorParts has wrong dimensions.");
143 return Entry[Part] !=
nullptr;
148 return ScalarMapStorage.count(Key);
153 assert(Instance.
Part < UF &&
"Queried Scalar Part is too large.");
154 assert(Instance.
Lane < VF &&
"Queried Scalar Lane is too large.");
155 if (!hasAnyScalarValue(Key))
157 const ScalarParts &Entry = ScalarMapStorage.find(Key)->second;
158 assert(Entry.
size() == UF &&
"ScalarParts has wrong dimensions.");
160 "ScalarParts has wrong dimensions.");
161 return Entry[Instance.
Part][Instance.
Lane] !=
nullptr;
167 assert(hasVectorValue(Key, Part) &&
"Getting non-existent value.");
168 return VectorMapStorage[
Key][Part];
174 assert(hasScalarValue(Key, Instance) &&
"Getting non-existent value.");
175 return ScalarMapStorage[
Key][Instance.
Part][Instance.
Lane];
181 assert(!hasVectorValue(Key, Part) &&
"Vector value already set for part");
182 if (!VectorMapStorage.count(Key)) {
184 VectorMapStorage[
Key] = Entry;
186 VectorMapStorage[
Key][Part] = Vector;
192 assert(!hasScalarValue(Key, Instance) &&
"Scalar value already set");
193 if (!ScalarMapStorage.count(Key)) {
197 for (
unsigned Part = 0; Part < UF; ++Part)
198 Entry[Part].resize(VF,
nullptr);
199 ScalarMapStorage[
Key] = Entry;
209 assert(hasVectorValue(Key, Part) &&
"Vector value not set for part");
210 VectorMapStorage[
Key][Part] = Vector;
219 assert(hasScalarValue(Key, Instance) &&
220 "Scalar value not set for part and lane");
229 virtual Value *getOrCreateVectorValues(
Value *V,
unsigned Part) = 0;
238 : VF(VF), UF(UF), Instance(), LI(LI), DT(DT), Builder(Builder),
239 ValueMap(ValueMap), ILV(ILV), Callback(Callback) {}
266 if (
Data.PerPartOutput.count(Def))
267 return Data.PerPartOutput[Def][Part];
269 return Callback.getOrCreateVectorValues(VPValue2Value[Def], Part);
274 if (!
Data.PerPartOutput.count(Def)) {
276 Data.PerPartOutput[
Def] = Entry;
278 Data.PerPartOutput[
Def][Part] = V;
338 const unsigned char SubclassID;
358 assert(Successor &&
"Cannot add nullptr successor!");
364 assert(Predecessor &&
"Cannot add nullptr predecessor!");
371 assert(Pos &&
"Predecessor does not exist");
372 Predecessors.
erase(Pos);
378 assert(Pos &&
"Successor does not exist");
379 Successors.
erase(Pos);
384 : SubclassID(SC), Name(N) {}
391 using VPBlockTy =
enum { VPBasicBlockSC, VPRegionBlockSC };
432 return (Successors.
size() == 1 ? *Successors.
begin() :
nullptr);
438 return (Predecessors.
size() == 1 ? *Predecessors.
begin() :
nullptr);
498 assert(Successors.
empty() &&
"Setting one successor when others exist.");
499 appendSuccessor(Successor);
508 assert(Successors.
empty() &&
"Setting two successors when others exist.");
509 assert(Condition &&
"Setting two successors without condition!");
511 appendSuccessor(IfTrue);
512 appendSuccessor(IfFalse);
519 assert(Predecessors.
empty() &&
"Block predecessors already set.");
520 for (
auto *Pred : NewPreds)
521 appendPredecessor(Pred);
538 printAsOperand(OS,
false);
555 const unsigned char SubclassID;
572 VPWidenIntOrFpInductionSC,
573 VPWidenMemoryInstructionSC,
618 Not = Instruction::OtherOpsEnd + 1,
625 typedef unsigned char OpcodeTy;
634 return cast_or_null<Instruction>(getUnderlyingValue());
680 Opcode == Instruction::Invoke || Opcode == SLPStore;
731 :
VPRecipeBase(VPWidenIntOrFpInductionSC), IV(IV), Trunc(Trunc) {}
736 return V->
getVPRecipeID() == VPRecipeBase::VPWidenIntOrFpInductionSC;
775 std::unique_ptr<VPUser>
User;
782 "Expected the same number of incoming values and masks");
784 User.reset(
new VPUser(Masks));
804 std::unique_ptr<VPUser>
User;
810 User.reset(
new VPUser({Mask}));
848 :
VPRecipeBase(VPReplicateSC), Ingredient(I), IsUniform(IsUniform),
849 IsPredicated(IsPredicated) {
855 AlsoPack = IsPredicated && !I->
use_empty();
879 std::unique_ptr<VPUser>
User;
884 User.reset(
new VPUser({BlockInMask}));
898 O <<
" +\n" << Indent <<
"\"BRANCH-ON-MASK ";
900 O << *User->getOperand(0);
941 std::unique_ptr<VPUser>
User;
945 :
VPRecipeBase(VPWidenMemoryInstructionSC), Instr(Instr) {
947 User.reset(
new VPUser({Mask}));
952 return V->
getVPRecipeID() == VPRecipeBase::VPWidenMemoryInstructionSC;
977 appendRecipe(Recipe);
1001 inline size_t size()
const {
return Recipes.size(); }
1002 inline bool empty()
const {
return Recipes.empty(); }
1013 return &VPBasicBlock::Recipes;
1018 return V->
getVPBlockID() == VPBlockBase::VPBasicBlockSC;
1022 assert(Recipe &&
"No recipe to append.");
1023 assert(!Recipe->Parent &&
"Recipe already in VPlan");
1024 Recipe->Parent =
this;
1025 Recipes.
insert(InsertPt, Recipe);
1064 const std::string &Name =
"",
bool IsReplicator =
false)
1065 :
VPBlockBase(VPRegionBlockSC, Name), Entry(Entry), Exit(Exit),
1066 IsReplicator(IsReplicator) {
1073 :
VPBlockBase(VPRegionBlockSC, Name), Entry(nullptr), Exit(nullptr),
1074 IsReplicator(IsReplicator) {}
1083 return V->
getVPBlockID() == VPBlockBase::VPRegionBlockSC;
1093 "Entry block cannot have predecessors.");
1111 "Exit block cannot have successors.");
1152 VPValue *BackedgeTakenCount =
nullptr;
1170 for (
auto &MapEntry : Value2VPValue)
1171 if (MapEntry.second != BackedgeTakenCount)
1172 delete MapEntry.second;
1173 if (BackedgeTakenCount)
1174 delete BackedgeTakenCount;
1191 if (!BackedgeTakenCount)
1192 BackedgeTakenCount =
new VPValue();
1193 return BackedgeTakenCount;
1207 VPExternalDefs.
insert(VPVal);
1216 assert(V &&
"Trying to add a null Value to VPlan");
1217 assert(!Value2VPValue.
count(V) &&
"Value already exists in VPlan");
1218 Value2VPValue[V] =
new VPValue();
1222 assert(V &&
"Trying to get the VPValue of a null Value");
1223 assert(Value2VPValue.
count(V) &&
"Value does not exist in VPlan");
1224 return Value2VPValue[V];
1250 unsigned TabWidth = 2;
1258 void bumpIndent(
int b) { Indent = std::string((Depth += b) * TabWidth,
' '); }
1274 unsigned getOrCreateBID(
const VPBlockBase *Block) {
1275 return BlockID.
count(Block) ? BlockID[Block] : BlockID[Block] = BID++;
1284 const Twine &Label);
1298 VPlanPrinter::printAsIngredient(OS, I.
V);
1416 return N.
Graph->getExit();
1446 "Can't insert new block with successors.");
1464 "Can't insert IfTrue with successors.");
1466 "Can't insert IfFalse with successors.");
1480 "Can't connect two block with different parents");
1482 "Blocks can't have more than two successors.");
1483 From->appendSuccessor(To);
1484 To->appendPredecessor(From);
1490 assert(To &&
"Successor to disconnect is null.");
1491 From->removeSuccessor(To);
1492 To->removePredecessor(From);
1521 for (
auto &
I : InterleaveGroupMap)
1523 for (
auto *Ptr : DelSet)
1530 InterleaveGroup<VPInstruction> *
1532 if (InterleaveGroupMap.
count(Instr))
1533 return InterleaveGroupMap.
find(Instr)->second;
1546 struct BundleDenseMapInfo {
1548 return {
reinterpret_cast<VPValue *
>(-1)};
1552 return {
reinterpret_cast<VPValue *
>(-2)};
1576 bool CompletelySLP =
true;
1579 unsigned WidestBundleBits = 0;
1581 using MultiNodeOpTy =
1582 typename std::pair<VPInstruction *, SmallVector<VPValue *, 4>>;
1591 bool MultiNodeActive =
false;
1600 VPInstruction *markFailed();
1609 std::pair<OpMode, VPValue *> getBest(OpMode
Mode,
VPValue *Last,
1620 for (
auto &KV : BundleToCombined)
1636 #endif // LLVM_TRANSFORMS_VECTORIZE_VPLAN_H const std::string & getName() const
VPWidenRecipe(Instruction *I)
const_iterator end(StringRef path)
Get end iterator over path.
const VPRegionBlock * getParent() const
bool appendInstruction(Instruction *Instr)
Augment the recipe to include Instr, if it lies at its End.
static NodeRef getEntryNode(Inverse< GraphRef > N)
void setAlsoPack(bool Pack)
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
enum { VPBasicBlockSC, VPRegionBlockSC } VPBlockTy
An enumeration for keeping track of the concrete subclass of VPBlockBase that are actually instantiat...
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
VectorizerValueMap(unsigned UF, unsigned VF)
Construct an empty map with the given unroll and vectorization factors.
SmallVectorImpl< VPBlockBase * >::const_iterator ChildIteratorType
This class represents lattice values for constants.
InnerLoopVectorizer vectorizes loops which contain only one basic block to a specified vectorization ...
VPRegionBlock(VPBlockBase *Entry, VPBlockBase *Exit, const std::string &Name="", bool IsReplicator=false)
const_reverse_iterator rbegin() const
static NodeRef getEntryNode(GraphRef N)
VPRegionBlock * getParent()
VPlan models a candidate for vectorization, encoding various decisions take to produce efficient outp...
VPInstruction(unsigned Opcode, ArrayRef< VPValue *> Operands)
Value * getScalarValue(Value *Key, const VPIteration &Instance)
Retrieve the existing scalar value that corresponds to Key and Instance.
void push_back(const T &Elt)
void setEntry(VPBlockBase *EntryBlock)
Set EntryBlock as the entry VPBlockBase of this VPRegionBlock.
VPlanIngredient(Value *V)
VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-S...
enum { VPBlendSC, VPBranchOnMaskSC, VPInstructionSC, VPInterleaveSC, VPPredInstPHISC, VPReplicateSC, VPWidenIntOrFpInductionSC, VPWidenMemoryInstructionSC, VPWidenPHISC, VPWidenSC, } VPRecipeTy
An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiat...
This is a helper struct for maintaining vectorization state.
bool mayWriteToMemory() const
Return true if this instruction may modify memory.
A Recipe for widening load/store operations.
Instruction * getUnderlyingInstr()
void print(raw_ostream &O, const Twine &Indent) const override
Print the recipe.
bool hasAnyScalarValue(Value *Key) const
void addExternalDef(VPValue *VPVal)
Add VPVal to the pool of external definitions if it's not already in the pool.
VPBlockBase * getSingleSuccessor() const
void addVPValue(Value *V)
print alias Alias Set Printer
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
VPlanSlp(VPInterleavedAccessInfo &IAI, VPBasicBlock &BB)
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
unsigned getVPRecipeID() const
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
VPValue * getVPValue(Value *V)
bool hasAnyVectorValue(Value *Key) const
static bool classof(const VPRecipeBase *R)
Method to support type inquiry through isa, cast, and dyn_cast.
VPPredInstPHIRecipe is a recipe for generating the phi nodes needed when control converges back from ...
const VPBlocksTy & getHierarchicalSuccessors()
amdgpu Simplify well known AMD library false Value Value const Twine & Name
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
static void insertBlockAfter(VPBlockBase *NewBlock, VPBlockBase *BlockPtr)
Insert disconnected VPBlockBase NewBlock after BlockPtr.
bool hasVectorValue(Value *Key, unsigned Part) const
VPBlocksTy & getSuccessors()
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
static StringRef getName(Value *V)
A recipe for handling all phi nodes except for integer and FP inductions.
~VPRegionBlock() override
void setName(const Twine &newName)
void insert(VPRecipeBase *Recipe, iterator InsertPt)
const std::string & getName() const
VPBlocksTy & getPredecessors()
static RecipeListTy VPBasicBlock::* getSublistAccess(VPRecipeBase *)
Returns a pointer to a member of the recipe list.
static ChildIteratorType child_end(NodeRef N)
void setName(const Twine &newName)
VPWidenPHIRecipe(PHINode *Phi)
static ChildIteratorType child_begin(NodeRef N)
VPBlockBase * getSinglePredecessor() const
Drive the analysis of interleaved memory accesses in the loop.
static bool isEqual(const Function &Caller, const Function &Callee)
VPlanPrinter prints a given VPlan to a given output stream.
static ChildIteratorType child_end(NodeRef N)
bool isReplicator() const
An indicator whether this region is to generate multiple replicated instances of output IR correspond...
InterleaveGroup< VPInstruction > * getInterleaveGroup(VPInstruction *Instr) const
Get the interleave group that Instr belongs to.
static nodes_iterator nodes_begin(GraphRef N)
static NodeRef getEntryNode(GraphRef N)
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
This class is used to enable the VPlan to invoke a method of ILV.
The group of interleaved loads/stores sharing the same stride and close to each other.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
const VPBlockBase * getExit() const
VPBlockBase * getSingleHierarchicalSuccessor()
VPBlockBase * getSingleHierarchicalPredecessor()
unsigned getVPBlockID() const
static bool classof(const VPValue *V)
Method to support type inquiry through isa, cast, and dyn_cast.
unsigned getVPValueID() const
VPInstruction(unsigned Opcode, std::initializer_list< VPValue *> Operands)
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
This class represents a truncation of integer types.
iterator begin()
Recipe iterator methods.
void resetScalarValue(Value *Key, const VPIteration &Instance, Value *Scalar)
Reset the scalar value associated with Key for Part and Lane.
bool isLegalToHoistInto()
Return true if it is legal to hoist instructions into this block.
iterator find(const_arg_type_t< KeyT > Val)
SmallVectorImpl< VPBlockBase * >::iterator ChildIteratorType
void appendRecipe(VPRecipeBase *Recipe)
Augment the existing recipes of a VPBasicBlock with an additional Recipe as the last recipe...
const VPBlocksTy & getHierarchicalPredecessors()
static nodes_iterator nodes_end(GraphRef N)
bool isCompletelySLP() const
Return true if all visited instruction can be combined.
This class augments VPValue with operands which provide the inverse def-use edges from VPValue's user...
An ilist node that can access its parent list.
typename VPBlockBase *::UnknownGraphTypeError NodeRef
void setOneSuccessor(VPBlockBase *Successor)
Set a given VPBlockBase Successor as the single successor of this VPBlockBase.
VPWidenMemoryInstructionRecipe(Instruction &Instr, VPValue *Mask)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
static ChildIteratorType child_begin(NodeRef N)
VPBlendRecipe(PHINode *Phi, ArrayRef< VPValue *> Masks)
void setExit(VPBlockBase *ExitBlock)
Set ExitBlock as the exit VPBlockBase of this VPRegionBlock.
This file defines VPLoopInfo analysis and VPLoop class.
reverse_iterator rbegin()
LLVM Basic Block Representation.
const VPValue * getCondBit() const
size_t size() const
size - Get the array size.
bool hasScalarValue(Value *Key, const VPIteration &Instance) const
VPWidenIntOrFpInductionRecipe(PHINode *IV, TruncInst *Trunc=nullptr)
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
size_t getNumPredecessors() const
static NodeRef getEntryNode(NodeRef N)
void addCBV(VPValue *CBV)
Add CBV to the vector of condition bit values.
VPInstruction * clone() const
std::unique_ptr< VPlan > VPlanPtr
static ChildIteratorType child_end(NodeRef N)
Class that maps (parts of) an existing VPlan to trees of combined VPInstructions. ...
void printAsOperand(raw_ostream &OS, bool PrintType) const
~VPInterleavedAccessInfo()
size_t getNumSuccessors() const
VPBlockBase * setEntry(VPBlockBase *Block)
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
self_iterator getIterator()
std::pair< NoneType, bool > insert(const T &V)
insert - Insert an element into the set if it isn't already there.
void setUnderlyingInstr(Instruction *I)
static bool classof(const VPBlockBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
VPBlockBase & front() const
SmallVectorImpl< VPBlockBase * >::iterator ChildIteratorType
iterator erase(const_iterator CI)
static void connectBlocks(VPBlockBase *From, VPBlockBase *To)
Connect VPBlockBases From and To bi-directionally.
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
void setScalarValue(Value *Key, const VPIteration &Instance, Value *Scalar)
Set a scalar value associated with Key and Instance.
An intrusive list with ownership and callbacks specified/controlled by ilist_traits, only with API safe for polymorphic types.
static nodes_iterator nodes_end(GraphRef N)
static void deleteCFG(VPBlockBase *Entry)
Delete all blocks reachable from a given VPBlockBase, inclusive.
void setPredecessors(ArrayRef< VPBlockBase *> NewPreds)
Set each VPBasicBlock in NewPreds as predecessor of this VPBlockBase.
VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph.
VPBlockBase(const unsigned char SC, const std::string &N)
const_iterator begin() const
const VPRecipeBase & back() const
Iterator for intrusive lists based on ilist_node.
void setTwoSuccessors(VPBlockBase *IfTrue, VPBlockBase *IfFalse, VPValue *Condition)
Set two given VPBlockBases IfTrue and IfFalse to be the two successors of this VPBlockBase.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
static void insertTwoBlocksAfter(VPBlockBase *IfTrue, VPBlockBase *IfFalse, VPValue *Condition, VPBlockBase *BlockPtr)
Insert disconnected VPBlockBases IfTrue and IfFalse after BlockPtr.
BlockVerifier::State From
A range of powers-of-2 vectorization factors with fixed start and adjustable end. ...
const VPRecipeBase & front() const
VPLoopInfo & getVPLoopInfo()
Return the VPLoopInfo analysis for this VPlan.
VPBlockBase is the building block of the Hierarchical Control-Flow Graph.
testing::Matcher< const detail::ErrorHolder & > Failed()
static NodeRef getEntryNode(Inverse< NodeRef > B)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
VPReplicateRecipe(Instruction *I, bool IsUniform, bool IsPredicated=false)
Class that provides utilities for VPBlockBases in VPlan.
static NodeRef getEntryNode(NodeRef N)
CHAIN = SC CHAIN, Imm128 - System call.
static bool classof(const VPBlockBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
const InterleaveGroup< Instruction > * getInterleaveGroup()
void setCondBit(VPValue *CV)
const VPBlocksTy & getSuccessors() const
unsigned getNumIncomingValues() const
Return the number of incoming edges.
const VPBlockBase * getEntry() const
VPInterleaveRecipe is a recipe for transforming an interleave group of load or stores into one wide l...
VPValue * getOrCreateBackedgeTakenCount()
The backedge taken count of the original loop.
void resetVectorValue(Value *Key, unsigned Part, Value *Vector)
Reset the vector value associated with Key for the given Part.
hash_code hash_combine_range(InputIteratorT first, InputIteratorT last)
Compute a hash_code for a sequence of values.
VPRegionBlock(const std::string &Name="", bool IsReplicator=false)
const VPBasicBlock * getParent() const
void print(raw_ostream &OS) const
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
iterator insert(iterator where, pointer New)
const VPBlocksTy & getPredecessors() const
static nodes_iterator nodes_begin(GraphRef N)
Value * getVectorValue(Value *Key, unsigned Part)
Retrieve the existing vector value that corresponds to Key and Part.
VPReplicateRecipe replicates a given instruction producing multiple scalar copies of the original sca...
LLVM_NODISCARD bool empty() const
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
VPRecipeBase(const unsigned char SC)
VPPredInstPHIRecipe(Instruction *PredInst)
Construct a VPPredInstPHIRecipe given PredInst whose value needs a phi nodes after merging back from ...
const VPBlockBase * getEntry() const
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
VPlan(VPBlockBase *Entry=nullptr)
A recipe for handling phi nodes of integer and floating-point inductions, producing their vector and ...
unsigned getOpcode() const
const_iterator end() const
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
size_type count(const_arg_type_t< KeyT > Val) const
Return 1 if the specified key is in the map, 0 otherwise.
std::string str() const
Return the twine contents as a std::string.
void setVectorValue(Value *Key, unsigned Part, Value *Vector)
Set a vector value associated with Key and Part.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
VPBasicBlock * getParent()
VPWidenRecipe is a recipe for producing a copy of vector type for each Instruction in its ingredients...
This file contains the declarations of the entities induced by Vectorization Plans, e.g.
LLVM Value Representation.
A recipe for generating conditional branches on the bits of a mask.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
static ChildIteratorType child_begin(NodeRef N)
This class implements an extremely fast bulk output stream that can only output to a stream...
A recipe for vectorizing a phi-node as a sequence of mask-based select instructions.
In what follows, the term "input IR" refers to code that is fed into the vectorizer whereas the term ...
static nodes_iterator nodes_end(GraphRef N)
static bool classof(const VPRecipeBase *V)
Method to support type inquiry through isa, cast, and dyn_cast.
unsigned getWidestBundleBits() const
Return the width of the widest combined bundle in bits.
This is a concrete Recipe that models a single VPlan-level instruction.
RecipeListTy & getRecipeList()
Returns a reference to the list of recipes.
VPBranchOnMaskRecipe(VPValue *BlockInMask)
const_reverse_iterator rend() const
static nodes_iterator nodes_begin(GraphRef N)
VPBasicBlock(const Twine &Name="", VPRecipeBase *Recipe=nullptr)
void setParent(VPRegionBlock *P)
static void disconnectBlocks(VPBlockBase *From, VPBlockBase *To)
Disconnect VPBlockBases From and To bi-directionally.
bool empty() const
empty - Check if the array is empty.
VPInterleaveRecipe(const InterleaveGroup< Instruction > *IG, VPValue *Mask)
const VPLoopInfo & getVPLoopInfo() const
size_type count(const T &V) const
count - Return 1 if the element is in the set, 0 otherwise.