25 #ifndef LLVM_TRANSFORMS_VECTORIZE_LOOPVECTORIZATIONPLANNER_H 26 #define LLVM_TRANSFORMS_VECTORIZE_LOOPVECTORIZATIONPLANNER_H 45 BB->
insert(Instr, InsertPt);
50 std::initializer_list<VPValue *> Operands) {
78 : Block(InsertBlock), Point(InsertPoint) {}
81 bool isSet()
const {
return Block !=
nullptr; }
98 assert(TheBB &&
"Attempting to set a null insert point");
100 InsertPt = BB->
end();
120 VPInstruction *NewVPInst = createInstruction(Opcode, Operands);
125 std::initializer_list<VPValue *> Operands,
135 return createInstruction(Instruction::BinaryOps::And, {LHS, RHS});
139 return createInstruction(Instruction::BinaryOps::Or, {LHS, RHS});
198 using VPlanPtr = std::unique_ptr<VPlan>;
209 Value *getOrCreateVectorValues(
Value *V,
unsigned Part)
override;
223 : OrigLoop(L), LI(LI), TLI(TLI), TTI(TTI), Legal(Legal), CM(CM) {}
233 void setBestPlan(
unsigned VF,
unsigned UF);
240 for (
const auto &Plan : VPlans)
254 void collectTriviallyDeadInstructions(
260 void buildVPlans(
unsigned MinVF,
unsigned MaxVF);
266 VPlanPtr buildVPlan(
VFRange &Range);
277 void buildVPlansWithVPRecipes(
unsigned MinVF,
unsigned MaxVF);
282 #endif // LLVM_TRANSFORMS_VECTORIZE_LOOPVECTORIZATIONPLANNER_H RAII object that stores the current insertion point and restores it when the object is destroyed...
bool isSet() const
Returns true if this insert point is set.
This class represents lattice values for constants.
InnerLoopVectorizer vectorizes loops which contain only one basic block to a specified vectorization ...
TODO: The following VectorizationFactor was pulled out of LoopVectorizationCostModel class...
void setUnderlyingValue(Value *Val)
LoopVectorizationLegality checks if it is legal to vectorize a loop, and to what vectorization factor...
VPInsertPoint()=default
Creates a new insertion point which doesn't point to anything.
VPValue * createNot(VPValue *Operand)
LoopVectorizationPlanner(Loop *L, LoopInfo *LI, const TargetLibraryInfo *TLI, const TargetTransformInfo *TTI, LoopVectorizationLegality *Legal, LoopVectorizationCostModel &CM)
void insert(VPRecipeBase *Recipe, iterator InsertPt)
VPValue * createNaryOp(unsigned Opcode, std::initializer_list< VPValue *> Operands, Instruction *Inst=nullptr)
RecipeListTy::iterator iterator
Instruction iterators...
This class is used to enable the VPlan to invoke a method of ILV.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
VPlan-based builder utility analogous to IRBuilder.
This file contains the declarations of the Vectorization Plan base classes:
VPValue * createNaryOp(unsigned Opcode, ArrayRef< VPValue *> Operands, Instruction *Inst=nullptr)
Create an N-ary operation with Opcode, Operands and set Inst as its underlying Instruction.
InsertPointGuard(VPBuilder &B)
InsertPoint - A saved insertion point.
VPBasicBlock::iterator getPoint() const
VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph.
Planner drives the vectorization process after having passed Legality checks.
Iterator for intrusive lists based on ilist_node.
A range of powers-of-2 vectorization factors with fixed start and adjustable end. ...
Provides information about what library functions are available for the current target.
Predicate
Predicate - These are "(BI << 5) | BO" for various predicates.
void setInsertPoint(VPBasicBlock *TheBB, VPBasicBlock::iterator IP)
This specifies that created instructions should be inserted at the specified point.
VPValue * createOr(VPValue *LHS, VPValue *RHS)
void clearInsertionPoint()
Clear the insertion point: created instructions will not be inserted into a block.
VPInstruction * insert(VPInstruction *I) const
Insert and return the specified instruction.
void printPlans(raw_ostream &O)
VPBasicBlock::iterator getInsertPoint() const
Represents a single loop in the control flow graph.
VPBasicBlock * getInsertBlock() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LoopVectorizationCostModel - estimates the expected speedups due to vectorization.
LLVM Value Representation.
VPBasicBlock * getBlock() const
This class implements an extremely fast bulk output stream that can only output to a stream...
print Print MemDeps of function
VPValue * createAnd(VPValue *LHS, VPValue *RHS)
void restoreIP(VPInsertPoint IP)
Sets the current insert point to a previously-saved location.
void setInsertPoint(VPBasicBlock *TheBB)
This specifies that created VPInstructions should be appended to the end of the specified block...
VPInsertPoint(VPBasicBlock *InsertBlock, VPBasicBlock::iterator InsertPoint)
Creates a new insertion point at the given location.
This is a concrete Recipe that models a single VPlan-level instruction.
The operation is expected to be selectable directly by the target, and no transformation is necessary...