LLVM 17.0.0git
Classes | Public Member Functions | List of all members
llvm::VPBuilder Class Reference

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
 
void clearInsertionPoint ()
 Clear the insertion point: created instructions will not be inserted into a block.
 
VPBasicBlockgetInsertBlock () 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.
 
VPInstructioninsert (VPInstruction *I) const
 Insert and return the specified instruction.
 
VPValuecreateNaryOp (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.
 
VPValuecreateNaryOp (unsigned Opcode, ArrayRef< VPValue * > Operands, DebugLoc DL, const Twine &Name="")
 
VPValuecreateNot (VPValue *Operand, DebugLoc DL, const Twine &Name="")
 
VPValuecreateAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL, const Twine &Name="")
 
VPValuecreateOr (VPValue *LHS, VPValue *RHS, DebugLoc DL, const Twine &Name="")
 
VPValuecreateSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal, DebugLoc DL, const Twine &Name="")
 

Detailed Description

VPlan-based builder utility analogous to IRBuilder.

Definition at line 44 of file LoopVectorizationPlanner.h.

Constructor & Destructor Documentation

◆ VPBuilder()

llvm::VPBuilder::VPBuilder ( )
default

Member Function Documentation

◆ clearInsertionPoint()

void llvm::VPBuilder::clearInsertionPoint ( )
inline

Clear the insertion point: created instructions will not be inserted into a block.

Definition at line 68 of file LoopVectorizationPlanner.h.

Referenced by restoreIP().

◆ createAnd()

VPValue * llvm::VPBuilder::createAnd ( VPValue LHS,
VPValue RHS,
DebugLoc  DL,
const Twine Name = "" 
)
inline

Definition at line 145 of file LoopVectorizationPlanner.h.

References DL, LHS, Name, and RHS.

◆ createNaryOp() [1/2]

VPValue * llvm::VPBuilder::createNaryOp ( unsigned  Opcode,
ArrayRef< VPValue * >  Operands,
DebugLoc  DL,
const Twine Name = "" 
)
inline

Definition at line 136 of file LoopVectorizationPlanner.h.

References DL, Name, and Operands.

◆ createNaryOp() [2/2]

VPValue * llvm::VPBuilder::createNaryOp ( unsigned  Opcode,
ArrayRef< VPValue * >  Operands,
Instruction Inst = nullptr,
const Twine Name = "" 
)
inline

Create an N-ary operation with Opcode, Operands and set Inst as its underlying Instruction.

Definition at line 127 of file LoopVectorizationPlanner.h.

References DL, Name, Operands, and llvm::VPValue::setUnderlyingValue().

Referenced by llvm::VPRecipeBuilder::createBlockInMask(), and createSelect().

◆ createNot()

VPValue * llvm::VPBuilder::createNot ( VPValue Operand,
DebugLoc  DL,
const Twine Name = "" 
)
inline

Definition at line 141 of file LoopVectorizationPlanner.h.

References DL, Name, and llvm::VPInstruction::Not.

Referenced by llvm::VPRecipeBuilder::createEdgeMask().

◆ createOr()

VPValue * llvm::VPBuilder::createOr ( VPValue LHS,
VPValue RHS,
DebugLoc  DL,
const Twine Name = "" 
)
inline

Definition at line 150 of file LoopVectorizationPlanner.h.

References DL, LHS, Name, and RHS.

Referenced by llvm::VPRecipeBuilder::createBlockInMask().

◆ createSelect()

VPValue * llvm::VPBuilder::createSelect ( VPValue Cond,
VPValue TrueVal,
VPValue FalseVal,
DebugLoc  DL,
const Twine Name = "" 
)
inline

Definition at line 155 of file LoopVectorizationPlanner.h.

References Cond, createNaryOp(), DL, and Name.

Referenced by llvm::VPRecipeBuilder::createEdgeMask().

◆ getInsertBlock()

VPBasicBlock * llvm::VPBuilder::getInsertBlock ( ) const
inline

Definition at line 73 of file LoopVectorizationPlanner.h.

◆ getInsertPoint()

VPBasicBlock::iterator llvm::VPBuilder::getInsertPoint ( ) const
inline

Definition at line 74 of file LoopVectorizationPlanner.h.

◆ insert()

VPInstruction * llvm::VPBuilder::insert ( VPInstruction I) const
inline

Insert and return the specified instruction.

Definition at line 120 of file LoopVectorizationPlanner.h.

References I, and llvm::VPBasicBlock::insert().

◆ restoreIP()

void llvm::VPBuilder::restoreIP ( VPInsertPoint  IP)
inline

◆ setInsertPoint() [1/2]

void llvm::VPBuilder::setInsertPoint ( VPBasicBlock TheBB)
inline

This specifies that created VPInstructions should be appended to the end of the specified block.

Definition at line 106 of file LoopVectorizationPlanner.h.

References assert(), and llvm::VPBasicBlock::end().

Referenced by llvm::VPRecipeBuilder::createBlockInMask(), and restoreIP().

◆ setInsertPoint() [2/2]

void llvm::VPBuilder::setInsertPoint ( VPBasicBlock TheBB,
VPBasicBlock::iterator  IP 
)
inline

This specifies that created instructions should be inserted at the specified point.

Definition at line 114 of file LoopVectorizationPlanner.h.


The documentation for this class was generated from the following file: