LLVM 20.0.0git
|
VPlan-based builder utility analogous to IRBuilder. More...
#include "Transforms/Vectorize/LoopVectorizationPlanner.h"
Classes | |
class | InsertPointGuard |
RAII object that stores the current insertion point and restores it when the object is destroyed. More... | |
class | VPInsertPoint |
InsertPoint - A saved insertion point. More... | |
Public Member Functions | |
VPBuilder ()=default | |
VPBuilder (VPBasicBlock *InsertBB) | |
VPBuilder (VPRecipeBase *InsertPt) | |
void | clearInsertionPoint () |
Clear the insertion point: created instructions will not be inserted into a block. | |
VPBasicBlock * | getInsertBlock () const |
VPBasicBlock::iterator | getInsertPoint () const |
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. | |
void | setInsertPoint (VPBasicBlock *TheBB, VPBasicBlock::iterator IP) |
This specifies that created instructions should be inserted at the specified point. | |
void | setInsertPoint (VPRecipeBase *IP) |
This specifies that created instructions should be inserted at the specified point. | |
VPInstruction * | createNaryOp (unsigned Opcode, ArrayRef< VPValue * > Operands, Instruction *Inst=nullptr, const Twine &Name="") |
Create an N-ary operation with Opcode , Operands and set Inst as its underlying Instruction. | |
VPInstruction * | createNaryOp (unsigned Opcode, ArrayRef< VPValue * > Operands, DebugLoc DL, const Twine &Name="") |
VPInstruction * | createOverflowingOp (unsigned Opcode, std::initializer_list< VPValue * > Operands, VPRecipeWithIRFlags::WrapFlagsTy WrapFlags, DebugLoc DL={}, const Twine &Name="") |
VPValue * | createNot (VPValue *Operand, DebugLoc DL={}, const Twine &Name="") |
VPValue * | createAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL={}, const Twine &Name="") |
VPValue * | createOr (VPValue *LHS, VPValue *RHS, DebugLoc DL={}, const Twine &Name="") |
VPValue * | createLogicalAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL={}, const Twine &Name="") |
VPValue * | createSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal, DebugLoc DL={}, const Twine &Name="", std::optional< FastMathFlags > FMFs=std::nullopt) |
VPValue * | createICmp (CmpInst::Predicate Pred, VPValue *A, VPValue *B, DebugLoc DL={}, const Twine &Name="") |
Create a new ICmp VPInstruction with predicate Pred and operands A and B . | |
Static Public Member Functions | |
static VPBuilder | getToInsertAfter (VPRecipeBase *R) |
Create a VPBuilder to insert after R . | |
VPlan-based builder utility analogous to IRBuilder.
Definition at line 45 of file LoopVectorizationPlanner.h.
|
default |
|
inline |
Definition at line 70 of file LoopVectorizationPlanner.h.
References setInsertPoint().
|
inline |
Definition at line 71 of file LoopVectorizationPlanner.h.
References setInsertPoint().
|
inline |
Clear the insertion point: created instructions will not be inserted into a block.
Definition at line 75 of file LoopVectorizationPlanner.h.
Referenced by restoreIP().
|
inline |
Definition at line 169 of file LoopVectorizationPlanner.h.
VPValue * VPBuilder::createICmp | ( | CmpInst::Predicate | Pred, |
VPValue * | A, | ||
VPValue * | B, | ||
DebugLoc | DL = {} , |
||
const Twine & | Name = "" |
||
) |
Create a new ICmp VPInstruction with predicate Pred
and operands A
and B
.
TODO: add createFCmp when needed.
Definition at line 6906 of file LoopVectorize.cpp.
References A, assert(), B, DL, llvm::CmpInst::FIRST_ICMP_PREDICATE, llvm::CmpInst::LAST_ICMP_PREDICATE, and Name.
Referenced by llvm::VPRecipeBuilder::createHeaderMask(), and llvm::VPRecipeBuilder::createSwitchEdgeMasks().
|
inline |
Definition at line 182 of file LoopVectorizationPlanner.h.
Referenced by llvm::VPRecipeBuilder::createEdgeMask(), and llvm::VPRecipeBuilder::createSwitchEdgeMasks().
|
inline |
Definition at line 152 of file LoopVectorizationPlanner.h.
|
inline |
Create an N-ary operation with Opcode
, Operands
and set Inst
as its underlying Instruction.
Definition at line 142 of file LoopVectorizationPlanner.h.
References DL, Name, Operands, and llvm::VPValue::setUnderlyingValue().
Referenced by addCanonicalIVRecipes(), addLiveOutsForFirstOrderRecurrences(), addVPLaneMaskPhiAndUpdateExitBranch(), and llvm::VPlanTransforms::adjustFixedOrderRecurrences().
|
inline |
Definition at line 164 of file LoopVectorizationPlanner.h.
Referenced by addVPLaneMaskPhiAndUpdateExitBranch(), llvm::VPRecipeBuilder::createEdgeMask(), and llvm::VPRecipeBuilder::createSwitchEdgeMasks().
|
inline |
Definition at line 174 of file LoopVectorizationPlanner.h.
Referenced by llvm::VPRecipeBuilder::createBlockInMask(), and llvm::VPRecipeBuilder::createSwitchEdgeMasks().
|
inline |
Definition at line 157 of file LoopVectorizationPlanner.h.
Referenced by addCanonicalIVRecipes(), and addVPLaneMaskPhiAndUpdateExitBranch().
|
inline |
Definition at line 188 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 80 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 81 of file LoopVectorizationPlanner.h.
|
inlinestatic |
Create a VPBuilder to insert after R
.
Definition at line 84 of file LoopVectorizationPlanner.h.
References B.
Referenced by llvm::VPlanTransforms::addActiveLaneMask().
|
inline |
Sets the current insert point to a previously-saved location.
Definition at line 111 of file LoopVectorizationPlanner.h.
References clearInsertionPoint(), llvm::VPBuilder::VPInsertPoint::getBlock(), llvm::VPBuilder::VPInsertPoint::getPoint(), llvm::VPBuilder::VPInsertPoint::isSet(), and setInsertPoint().
Referenced by llvm::VPBuilder::InsertPointGuard::~InsertPointGuard().
|
inline |
This specifies that created VPInstructions should be appended to the end of the specified block.
Definition at line 120 of file LoopVectorizationPlanner.h.
References assert(), and llvm::VPBasicBlock::end().
Referenced by addLiveOutsForFirstOrderRecurrences(), addVPLaneMaskPhiAndUpdateExitBranch(), llvm::VPlanTransforms::adjustFixedOrderRecurrences(), llvm::VPRecipeBuilder::createHeaderMask(), restoreIP(), and VPBuilder().
|
inline |
This specifies that created instructions should be inserted at the specified point.
Definition at line 128 of file LoopVectorizationPlanner.h.
|
inline |
This specifies that created instructions should be inserted at the specified point.
Definition at line 135 of file LoopVectorizationPlanner.h.
References llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::VPRecipeBase::getParent().