Go to the documentation of this file.
51 #define DEBUG_TYPE "vplan"
62 : SubclassID(
SC), UnderlyingVal(UV),
Def(
Def) {
64 Def->addDefinedValue(
this);
68 assert(Users.empty() &&
"trying to delete a VPValue with remaining users");
70 Def->removeDefinedValue(
this);
89 const VPRecipeBase *Instr = dyn_cast_or_null<VPRecipeBase>(
this);
101 while ((Next = Next->getParent()))
107 for (
unsigned i = 0;
i < WorkList.
size();
i++) {
108 T *Current = WorkList[
i];
109 if (Current->getNumPredecessors() == 0)
111 auto &Predecessors = Current->getPredecessors();
112 WorkList.
insert(Predecessors.begin(), Predecessors.end());
127 return cast<VPBasicBlock>(Block);
134 return cast<VPBasicBlock>(Block);
139 "Can only set plan on its entry block.");
148 return cast<VPBasicBlock>(Block);
155 return cast<VPBasicBlock>(Block);
159 if (!Successors.empty() || !Parent)
162 "Block w/o successors not the exit of its parent.");
167 if (!Predecessors.empty() || !Parent)
170 "Block w/o predecessors not the entry of its parent.");
235 while (It !=
end() && (isa<VPWidenPHIRecipe>(&*It) ||
236 isa<VPWidenIntOrFpInductionRecipe>(&*It) ||
237 isa<VPPredInstPHIRecipe>(&*It) ||
238 isa<VPWidenCanonicalIVRecipe>(&*It)))
245 return Def->getLiveInIRValue();
252 if (!VecPart->getType()->isVectorTy()) {
286 "Unexpected null predecessor in non VPlan-native path");
287 CFG.VPBBsToFix.push_back(PredVPBB);
291 assert(PredBB &&
"Predecessor basic-block not found building successor.");
294 if (isa<UnreachableInst>(PredBBTerminator)) {
295 assert(PredVPSuccessors.size() == 1 &&
296 "Predecessor ending w/o branch must have single successor.");
297 PredBBTerminator->eraseFromParent();
300 assert(PredVPSuccessors.size() == 2 &&
301 "Predecessor ending with branch must have two successors.");
302 unsigned idx = PredVPSuccessors.front() ==
this ? 0 : 1;
303 assert(!PredBBTerminator->getSuccessor(idx) &&
304 "Trying to reset an existing successor block.");
305 PredBBTerminator->setSuccessor(idx, NewBB);
330 NewBB = createEmptyBasicBlock(State->
CFG);
343 <<
" in BB:" << NewBB->
getName() <<
'\n');
354 "Unexpected null underlying value for condition bit");
361 Value *NewCond = State->
get(CBV, {0, 0});
366 assert(isa<UnreachableInst>(CurrentTerminator) &&
367 "Expected to replace unreachable terminator with conditional "
370 CondBr->setSuccessor(0,
nullptr);
379 for (
auto *
Def : R.definedValues())
380 Def->replaceAllUsesWith(NewValue);
382 for (
unsigned I = 0,
E = R.getNumOperands();
I !=
E;
I++)
383 R.setOperand(
I, NewValue);
391 Block->dropAllReferences(NewValue);
405 if (Block->getNumPredecessors() == 0)
410 if (Block->getNumSuccessors() == 0)
414 LLVM_DEBUG(
dbgs() <<
"LV: VPBlock in RPO " << Block->getName() <<
'\n');
415 Block->execute(State);
420 assert(!State->
Instance &&
"Replicating a Region with non-null instance.");
425 for (
unsigned Part = 0, UF = State->
UF; Part < UF; ++Part) {
433 LLVM_DEBUG(
dbgs() <<
"LV: VPBlock in RPO " << Block->getName() <<
'\n');
434 Block->execute(State);
444 assert(!Parent &&
"Recipe already in some VPBasicBlock");
446 "Insertion position not in any VPBasicBlock");
452 assert(!Parent &&
"Recipe already in some VPBasicBlock");
454 "Insertion position not in any VPBasicBlock");
480 BB.getRecipeList().insert(
I,
this);
491 State.
set(
this, V, Part);
499 State.
set(
this, V, Part);
506 State.
set(
this, V, Part);
514 State.
set(
this, V, Part);
526 Intrinsic::get_active_lane_mask, {PredTy, ScalarTC->
getType()},
527 {VIVElem0, ScalarTC},
nullptr,
"active.lane.mask");
528 State.
set(
this, Call, Part);
538 for (
unsigned Part = 0; Part < State.
UF; ++Part)
539 generateInstruction(State, Part);
564 O <<
"combined load";
567 O <<
"combined store";
570 O <<
"active lane mask";
588 if (BackedgeTakenCount && BackedgeTakenCount->
getNumUsers()) {
592 "trip.count.minus.1");
595 VF.isScalar() ? TCMO :
Builder.CreateVectorSplat(VF, TCMO,
"broadcast");
596 for (
unsigned Part = 0, UF = State->
UF; Part < UF; ++Part)
597 State->
set(BackedgeTakenCount, VTCMO, Part);
601 for (
auto &Entry : Value2VPValue)
606 assert(VectorHeaderBB &&
"Loop preheader does not have a single successor.");
628 Block->execute(State);
634 "Unexpected VPBBsToFix in non VPlan-native path");
636 assert(
BB &&
"Unexpected null basic block for VPBB");
639 auto *BBTerminator =
BB->getTerminator();
643 BBTerminator->setSuccessor(Idx, State->
CFG.
VPBB2IRBB[SuccVPBB]);
653 "Expected InnerLoop VPlan CFG to terminate with unreachable");
655 "Expected VPlan CFG to terminate with branch in NativePath");
662 assert(Merged &&
"Could not merge last basic block with latch.");
663 VectorLatchBB = LastBB;
667 updateDominatorTree(State->
DT, VectorPreHeaderBB, VectorLatchBB,
671 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
680 assert(LoopHeaderBB &&
"Loop preheader does not have a single successor.");
685 for (
auto *
BB = LoopHeaderBB;
BB != LoopLatchBB;
BB = PostDomSucc) {
688 assert(Succs.size() <= 2 &&
689 "Basic block in vector loop has more than 2 successors.");
690 PostDomSucc = Succs[0];
691 if (Succs.size() == 1) {
693 "PostDom successor has more than one predecessor.");
699 PostDomSucc = Succs[1];
700 InterimSucc = Succs[0];
703 "One successor of a basic block does not lead to the other.");
705 "Interim successor has more than one predecessor.");
707 "PostDom successor has more than two predecessors.");
717 return (isa<VPRegionBlock>(Block) ?
"cluster_N" :
"N") +
718 Twine(getOrCreateBID(Block));
722 const std::string &
Name =
Block->getName();
725 return "VPB" +
Twine(getOrCreateBID(Block));
728 void VPlanPrinter::dump() {
731 OS <<
"digraph VPlan {\n";
732 OS <<
"graph [labelloc=t, fontsize=30; label=\"Vectorization Plan";
735 if (Plan.BackedgeTakenCount) {
738 OS <<
" := BackedgeTakenCount";
741 OS <<
"node [shape=rect, fontname=Courier, fontsize=30]\n";
742 OS <<
"edge [fontname=Courier, fontsize=30]\n";
743 OS <<
"compound=true\n";
751 void VPlanPrinter::dumpBlock(
const VPBlockBase *Block) {
761 bool Hidden,
const Twine &Label) {
766 OS << Indent << getUID(
Tail) <<
" -> " << getUID(Head);
767 OS <<
" [ label=\"" <<
Label <<
'\"';
769 OS <<
" ltail=" << getUID(
From);
771 OS <<
" lhead=" << getUID(To);
773 OS <<
"; splines=none";
777 void VPlanPrinter::dumpEdges(
const VPBlockBase *Block) {
778 auto &Successors =
Block->getSuccessors();
779 if (Successors.size() == 1)
780 drawEdge(Block, Successors.front(),
false,
"");
781 else if (Successors.size() == 2) {
782 drawEdge(Block, Successors.front(),
false,
"T");
783 drawEdge(Block, Successors.back(),
false,
"F");
785 unsigned SuccessorNumber = 0;
792 OS << Indent << getUID(
BasicBlock) <<
" [label =\n";
800 OS <<
" +\n" << Indent <<
" \"BlockPredicate: \"";
801 if (
const VPInstruction *PredI = dyn_cast<VPInstruction>(Pred)) {
810 OS <<
" +\n" << Indent <<
"\"";
818 OS <<
" +\n" << Indent <<
" \"CondBit: ";
819 if (
const VPInstruction *CBI = dyn_cast<VPInstruction>(CBV)) {
829 OS <<
"\n" << Indent <<
"]\n";
834 OS << Indent <<
"subgraph " << getUID(
Region) <<
" {\n";
836 OS << Indent <<
"fontname=Courier\n"
837 << Indent <<
"label=\""
845 OS << Indent <<
"}\n";
850 std::string IngredientString;
852 if (
auto *Inst = dyn_cast<Instruction>(V)) {
853 if (!Inst->getType()->isVoidTy()) {
854 Inst->printAsOperand(RSO,
false);
857 RSO << Inst->getOpcodeName() <<
" ";
858 unsigned E = Inst->getNumOperands();
860 Inst->getOperand(0)->printAsOperand(RSO,
false);
861 for (
unsigned I = 1;
I <
E; ++
I)
862 Inst->getOperand(
I)->printAsOperand(RSO <<
", ",
false);
875 if (CI->getType()->isVoidTy())
882 O <<
"call @" << CI->getCalledFunction()->getName() <<
"(";
889 O <<
"WIDEN-SELECT ";
897 O << (InvariantCond ?
" (condition is loop invariant)" :
"");
910 O <<
"WIDEN-INDUCTION";
914 O <<
" +\n" << Indent <<
"\" ";
923 O << (IsPtrLoopInvariant ?
"Inv" :
"Var");
924 size_t IndicesNumber = IsIndexLoopInvariant.
size();
925 for (
size_t I = 0;
I < IndicesNumber; ++
I)
926 O <<
"[" << (IsIndexLoopInvariant[
I] ?
"Inv" :
"Var") <<
"]";
930 O <<
" = getelementptr ";
977 O << (IsUniform ?
"CLONE " :
"REPLICATE ");
992 O <<
"PHI-PREDICATED-INSTRUCTION ";
1016 assert(!VF.
isScalable() &&
"the code following assumes non scalables ECs");
1020 CanonicalIV,
"broadcast");
1021 for (
unsigned Part = 0, UF = State.
UF; Part < UF; ++Part) {
1031 Value *CanonicalVectorIV =
Builder.CreateAdd(VStart, VStep,
"vec.iv");
1040 O <<
" = WIDEN-CANONICAL-INDUCTION";
1043 template void DomTreeBuilder::Calculate<VPDominatorTree>(
VPDominatorTree &DT);
1063 UV->printAsOperand(OS,
false);
1068 unsigned Slot = Tracker.
getSlot(
this);
1069 if (Slot ==
unsigned(-1))
1072 OS <<
"vp<%" << Tracker.
getSlot(
this) <<
">";
1086 visitBlock(Base, Old2New, IAI);
1090 void VPInterleavedAccessInfo::visitBlock(
VPBlockBase *Block, Old2NewTy &Old2New,
1092 if (
VPBasicBlock *VPBB = dyn_cast<VPBasicBlock>(Block)) {
1094 if (isa<VPWidenPHIRecipe>(&VPI))
1096 assert(isa<VPInstruction>(&VPI) &&
"Can only handle VPInstructions");
1097 auto *VPInst = cast<VPInstruction>(&VPI);
1098 auto *Inst = cast<Instruction>(VPInst->getUnderlyingValue());
1103 auto NewIGIter = Old2New.find(IG);
1104 if (NewIGIter == Old2New.end())
1106 IG->getFactor(), IG->isReverse(), IG->getAlign());
1108 if (Inst == IG->getInsertPos())
1109 Old2New[IG]->setInsertPos(VPInst);
1111 InterleaveGroupMap[VPInst] = Old2New[IG];
1112 InterleaveGroupMap[VPInst]->insertMember(
1113 VPInst, IG->getIndex(Inst),
1114 Align(IG->isReverse() ? (-1) *
int(IG->getFactor())
1115 : IG->getFactor()));
1118 visitRegion(
Region, Old2New, IAI);
1126 visitRegion(cast<VPRegionBlock>(Plan.
getEntry()), Old2New, IAI);
1129 void VPSlotTracker::assignSlot(
const VPValue *V) {
1130 assert(Slots.find(V) == Slots.end() &&
"VPValue already has a slot!");
1131 Slots[V] = NextSlot++;
1134 void VPSlotTracker::assignSlots(
const VPBlockBase *VPBB) {
1135 if (
auto *
Region = dyn_cast<VPRegionBlock>(VPBB))
1138 assignSlots(cast<VPBasicBlock>(VPBB));
1147 void VPSlotTracker::assignSlots(
const VPBasicBlock *VPBB) {
1154 void VPSlotTracker::assignSlots(
const VPlan &Plan) {
1156 for (
const VPValue *V : Plan.VPExternalDefs)
1159 if (Plan.BackedgeTakenCount)
1160 assignSlot(Plan.BackedgeTakenCount);
RecipeListTy & getRecipeList()
Returns a reference to the list of recipes.
unsigned getOpcode() const
void moveAfter(VPRecipeBase *MovePos)
Unlink this recipe from its current VPBasicBlock and insert it into the VPBasicBlock that MovePos liv...
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
unsigned getNumIncomingValues() const
Return the number of incoming values, taking into account that a single incoming value has no mask.
void execute(struct VPTransformState *State)
Generate the IR code for this VPlan.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
VPValue * getIncomingValue(unsigned Idx) const
Return incoming value number Idx.
void SetInsertPoint(BasicBlock *TheBB)
This specifies that created instructions should be appended to the end of the specified block.
This class represents lattice values for constants.
Instruction * getUnderlyingInstr()
Returns the underlying instruction, if the recipe is a VPValue or nullptr otherwise.
static IntegerType * getInt1Ty(LLVMContext &C)
iplist< VPRecipeBase >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
BlockT * getExitBlock() const
If getExitBlocks would return exactly one block, return that block.
void execute(VPTransformState &State) override
Generate a canonical vector induction variable of the vector loop, with start = {<Part*VF,...
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
VPBlockBase * getEnclosingBlockWithPredecessors()
const std::string & getName() const
const Function * getParent() const
Return the enclosing method, or null if none.
Interval::succ_iterator succ_end(Interval *I)
VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph.
Represents a single loop in the control flow graph.
const VPBasicBlock * getExitBasicBlock() const
A raw_ostream that writes to an std::string.
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
size_type size() const
Determine the number of elements in the SetVector.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
void dropAllReferences(VPValue *NewValue) override
Replace all operands of VPUsers in the block with NewValue and also replaces all uses of VPValues def...
virtual void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const =0
Each concrete VPDef prints itself.
std::string EscapeString(const std::string &Label)
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
static unsigned getOpcode(RecurKind Kind)
Returns the opcode corresponding to the RecurrenceKind.
void interleaveComma(const Container &c, StreamT &os, UnaryFunctor each_fn)
void dropAllReferences(VPValue *NewValue) override
Replace all operands of VPUsers in the block with NewValue and also replaces all uses of VPValues def...
The instances of the Type class are immutable: once they are created, they are never changed.
TruncInst * getTruncInst()
Returns the first defined value as TruncInst, if it is one or nullptr otherwise.
void dump() const
Dump the value to stderr (for debugging).
const BasicBlock * getSingleSuccessor() const
Return the successor of this block if it has a single successor.
const VPBlocksTy & getHierarchicalPredecessors()
BasicBlock * splitBasicBlock(iterator I, const Twine &BBName="", bool Before=false)
Split the basic block into two basic blocks at the specified instruction.
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
void print(raw_ostream &OS, VPSlotTracker &Tracker) const
pointer remove(iterator &IT)
const BasicBlock * getSinglePredecessor() const
Return the predecessor of this block if it has a single predecessor block.
bool hasNPredecessors(unsigned N) const
Return true if this block has exactly N predecessors.
const VPBlockBase * getEntry() const
VPValue(const unsigned char SC, Value *UV=nullptr, VPDef *Def=nullptr)
The group of interleaved loads/stores sharing the same stride and close to each other.
bool isScalable() const
Returns whether the size is scaled by a runtime quantity (vscale).
An intrusive list with ownership and callbacks specified/controlled by ilist_traits,...
void setPredicate(VPValue *Pred)
Set the block's predicate.
iterator erase(iterator where)
LLVM Basic Block Representation.
This class augments a recipe with a set of VPValues defined by the recipe.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
bool isScalar() const
Counting predicates.
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
VPBlockBase is the building block of the Hierarchical Control-Flow Graph.
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
unsigned getOpcode() const
Returns a member of one of the enums like Instruction::Add.
This is a concrete Recipe that models a single VPlan-level instruction.
@ SC
CHAIN = SC CHAIN, Imm128 - System call.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static void resetSingleOpUser(VPUser &U, VPValue *NewVal)
static Optional< unsigned > getOpcode(ArrayRef< VPValue * > Values)
Returns the opcode of Values or ~0 if they do not all agree.
void moveBefore(VPBasicBlock &BB, iplist< VPRecipeBase >::iterator I)
Unlink this recipe and insert into BB before I.
void ReplaceInstWithInst(BasicBlock::InstListType &BIL, BasicBlock::iterator &BI, Instruction *I)
Replace the instruction specified by BI with the instruction specified by I.
const_iterator getFirstInsertionPt() const
Returns an iterator to the first instruction in this block that is suitable for inserting a non-PHI i...
VPBlockBase * getEnclosingBlockWithSuccessors()
An Enclosing Block of a block B is any block containing B, including B itself.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
const char * getOpcodeName() const
Drive the analysis of interleaved memory accesses in the loop.
void replaceAllUsesWith(VPValue *New)
static VPValue * getSingleOperandOrNull(VPUser &U)
void execute(struct VPTransformState *State) override
The method which generates the output IR instructions that correspond to this VPRegionBlock,...
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
const std::string & getName() const
void changeImmediateDominator(DomTreeNodeBase< NodeT > *N, DomTreeNodeBase< NodeT > *NewIDom)
changeImmediateDominator - This method is used to update the dominator tree information when a node's...
static FixedVectorType * get(Type *ElementType, unsigned NumElts)
This struct is a compact representation of a valid (non-zero power of two) alignment.
unsigned getNumOperands() const
VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-S...
bool isStore() const
Returns true if this recipe is a store.
const VPBlocksTy & getPredecessors() const
cl::opt< bool > EnableVPlanNativePath
void setOperand(unsigned I, VPValue *New)
@ Fast
Fast - This calling convention attempts to make calls as fast as possible (e.g.
void removeFromParent()
This method unlinks 'this' from the containing basic block, but does not delete it.
const VPBlocksTy & getHierarchicalSuccessors()
This is an important base class in LLVM.
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
VPDef * Def
Pointer to the VPDef that defines this VPValue.
VPValue * getCondOp() const
The VPValue of the condition for the block.
unsigned getSlot(const VPValue *V) const
VPBlockBase * getSingleHierarchicalSuccessor()
VPBlockBase * getSingleHierarchicalPredecessor()
BlockT * getEntry() const
Get the entry BasicBlock of the Region.
void execute(VPTransformState &State) override
Generate the instruction.
ConstantInt * getInt32(uint32_t C)
Get a constant 32-bit value.
static BranchInst * Create(BasicBlock *IfTrue, Instruction *InsertBefore=nullptr)
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the VPInstruction to O.
unsigned getNumUsers() const
LoopT * getLoopFor(const BlockT *BB) const
Return the inner most loop that BB lives in.
In what follows, the term "input IR" refers to code that is fed into the vectorizer whereas the term ...
Interval::succ_iterator succ_begin(Interval *I)
succ_begin/succ_end - define methods so that Intervals may be used just like BasicBlocks can with the...
VPValue * getMask(unsigned Idx) const
Return mask number Idx.
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
UnreachableInst * CreateUnreachable()
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static T * getPlanEntry(T *Start)
void execute(struct VPTransformState *State) override
The method which generates the output IR instructions that correspond to this VPBasicBlock,...
Value * CreateExtractElement(Value *Vec, Value *Idx, const Twine &Name="")
bool isVoidTy() const
Return true if this is 'void'.
void printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const
Print the operands to O.
ScalarTy getKnownMinValue() const
Returns the minimum value this size can represent.
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
void printAsOperand(raw_ostream &O, bool PrintType=true, const Module *M=nullptr) const
Print the name of this Value out to the specified raw_ostream.
void setOperand(unsigned i, Value *Val)
bool insert(const value_type &X)
Insert a new element into the SetVector.
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
VPValue * getVecOp() const
The VPValue of the vector value to be reduced.
bool MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU=nullptr, LoopInfo *LI=nullptr, MemorySSAUpdater *MSSAU=nullptr, MemoryDependenceResults *MemDep=nullptr, bool PredecessorWithTwoSuccessors=false)
Attempts to merge a block into its predecessor, if possible.
SmallVector< MachineOperand, 4 > Cond
void addOperand(VPValue *Operand)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Type * getType() const
All values are typed, get the type of this value.
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
VPBasicBlock * getParent()
self_iterator getIterator()
Core dominator tree base class.
static Constant * get(ArrayRef< Constant * > V)
StringRef getName() const
Return a constant reference to the value's name.
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
const VPBasicBlock * getEntryBasicBlock() const
DomTreeNodeBase< NodeT > * addNewBlock(NodeT *BB, NodeT *DomBB)
Add a new node to the dominator tree information.
LLVMContext & getContext() const
Get the context in which this basic block lives.
iterator_range< df_iterator< T > > depth_first(const T &G)
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to CFG
void setCondBit(VPValue *CV)
Set the condition bit selecting the successor.
void dump() const
Dump the VPDef to stderr (for debugging).
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
This class can be used to assign consecutive numbers to all VPValues in a VPlan and allows querying t...
@ Tail
Tail - This calling convention attemps to make calls as fast as possible while guaranteeing that tail...
const VPBlockBase * getExit() const
Iterator for intrusive lists based on ilist_node.
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
This class provides computation of slot numbers for LLVM Assembly writing.
iterator insertAfter(iterator where, pointer New)
iterator insert(iterator where, pointer New)
This class augments VPValue with operands which provide the inverse def-use edges from VPValue's user...
unsigned getNumOperands() const
iterator begin()
Recipe iterator methods.
void addBasicBlockToLoop(BlockT *NewBB, LoopInfoBase< BlockT, LoopT > &LI)
This method is used by other analyses to update loop information.
VPValue * getOperand(unsigned N) const
bool verify(VerificationLevel VL=VerificationLevel::Full) const
verify - checks if the tree is correct.
A SetVector that performs no allocations if smaller than a certain size.
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
This function has undefined behavior.
static void deleteCFG(VPBlockBase *Entry)
Delete all blocks reachable from a given VPBlockBase, inclusive.
bool isReplicator() const
An indicator whether this region is to generate multiple replicated instances of output IR correspond...
BlockVerifier::State From
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
Value * getOperand(unsigned i) const
size_t size() const
Returns the number of bits in this bitvector.
iterator getFirstNonPhi()
Return the position of the first non-phi node recipe in the block.
VPValue * getChainOp() const
The VPValue of the scalar Chain being accumulated.
VPInterleavedAccessInfo(VPlan &Plan, InterleavedAccessInfo &IAI)
const VPBlocksTy & getSuccessors() const
void dump() const
Print the VPInstruction to dbgs() (for debugging).
BlockT * getExit() const
Get the exit BasicBlock of the Region.
VPValue * getVPValue(unsigned I=0)
Returns the VPValue with index I defined by the VPDef.
Value * getUnderlyingValue()
Return the underlying Value attached to this VPValue.
VPlan models a candidate for vectorization, encoding various decisions take to produce efficient outp...
void setPlan(VPlan *ParentPlan)
Sets the pointer of the plan containing the block.
LLVM Value Representation.
void insertBefore(VPRecipeBase *InsertPos)
Insert an unlinked recipe into a basic block immediately before the specified recipe.
void dump() const
Dump the plan to stderr (for debugging).
void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override
Print the recipe.
void printAsOperand(raw_ostream &OS, VPSlotTracker &Tracker) const
void insertAfter(VPRecipeBase *InsertPos)
Insert an unlinked Recipe into a basic block immediately after the specified Recipe.
InterleaveGroup< Instruction > * getInterleaveGroup(const Instruction *Instr) const
Get the interleave group that Instr belongs to.