LLVM 18.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) | |
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. | |
VPValue * | 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. | |
VPValue * | 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 * | createSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal, DebugLoc DL, const Twine &Name="") |
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 . | |
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 |
Clear the insertion point: created instructions will not be inserted into a block.
Definition at line 74 of file LoopVectorizationPlanner.h.
Referenced by restoreIP().
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 7495 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().
|
inline |
Create an N-ary operation with Opcode
, Operands
and set Inst
as its underlying Instruction.
Definition at line 134 of file LoopVectorizationPlanner.h.
References DL, Name, Opcode, Operands, and llvm::VPValue::setUnderlyingValue().
Referenced by addVPLaneMaskPhiAndUpdateExitBranch(), llvm::VPlanTransforms::adjustFixedOrderRecurrences(), and createSelect().
|
inline |
Definition at line 155 of file LoopVectorizationPlanner.h.
References DL, Name, and llvm::VPInstruction::Not.
Referenced by addVPLaneMaskPhiAndUpdateExitBranch(), and llvm::VPRecipeBuilder::createEdgeMask().
|
inline |
Definition at line 164 of file LoopVectorizationPlanner.h.
References DL, LHS, Name, and RHS.
Referenced by llvm::VPRecipeBuilder::createBlockInMask().
|
inline |
Definition at line 148 of file LoopVectorizationPlanner.h.
References DL, Name, Opcode, and Operands.
Referenced by addVPLaneMaskPhiAndUpdateExitBranch().
|
inline |
Definition at line 169 of file LoopVectorizationPlanner.h.
References Cond, createNaryOp(), DL, and Name.
Referenced by llvm::VPRecipeBuilder::createEdgeMask().
|
inline |
Definition at line 79 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 80 of file LoopVectorizationPlanner.h.
|
inline |
Sets the current insert point to a previously-saved location.
Definition at line 103 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 112 of file LoopVectorizationPlanner.h.
References assert(), and llvm::VPBasicBlock::end().
Referenced by 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 120 of file LoopVectorizationPlanner.h.
|
inline |
This specifies that created instructions should be inserted at the specified point.
Definition at line 127 of file LoopVectorizationPlanner.h.
References llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::VPRecipeBase::getParent().