LLVM  14.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 ()
 
void clearInsertionPoint ()
 Clear the insertion point: created instructions will not be inserted into a block. More...
 
VPBasicBlockgetInsertBlock () const
 
VPBasicBlock::iterator getInsertPoint () const
 
void restoreIP (VPInsertPoint IP)
 Sets the current insert point to a previously-saved location. More...
 
void setInsertPoint (VPBasicBlock *TheBB)
 This specifies that created VPInstructions should be appended to the end of the specified block. More...
 
void setInsertPoint (VPBasicBlock *TheBB, VPBasicBlock::iterator IP)
 This specifies that created instructions should be inserted at the specified point. More...
 
VPInstructioninsert (VPInstruction *I) const
 Insert and return the specified instruction. More...
 
VPValuecreateNaryOp (unsigned Opcode, ArrayRef< VPValue * > Operands, Instruction *Inst=nullptr)
 Create an N-ary operation with Opcode, Operands and set Inst as its underlying Instruction. More...
 
VPValuecreateNaryOp (unsigned Opcode, ArrayRef< VPValue * > Operands, DebugLoc DL)
 
VPValuecreateNot (VPValue *Operand, DebugLoc DL)
 
VPValuecreateAnd (VPValue *LHS, VPValue *RHS, DebugLoc DL)
 
VPValuecreateOr (VPValue *LHS, VPValue *RHS, DebugLoc DL)
 
VPValuecreateSelect (VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal, DebugLoc DL)
 

Detailed Description

VPlan-based builder utility analogous to IRBuilder.

Definition at line 43 of file LoopVectorizationPlanner.h.

Constructor & Destructor Documentation

◆ VPBuilder()

llvm::VPBuilder::VPBuilder ( )
inline

Definition at line 62 of file LoopVectorizationPlanner.h.

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 66 of file LoopVectorizationPlanner.h.

References BB.

Referenced by restoreIP().

◆ createAnd()

VPValue* llvm::VPBuilder::createAnd ( VPValue LHS,
VPValue RHS,
DebugLoc  DL 
)
inline

Definition at line 143 of file LoopVectorizationPlanner.h.

References DL, LHS, and RHS.

◆ createNaryOp() [1/2]

VPValue* llvm::VPBuilder::createNaryOp ( unsigned  Opcode,
ArrayRef< VPValue * >  Operands,
DebugLoc  DL 
)
inline

Definition at line 134 of file LoopVectorizationPlanner.h.

References DL, and Operands.

◆ createNaryOp() [2/2]

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

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

Definition at line 125 of file LoopVectorizationPlanner.h.

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

Referenced by createSelect().

◆ createNot()

VPValue* llvm::VPBuilder::createNot ( VPValue Operand,
DebugLoc  DL 
)
inline

Definition at line 139 of file LoopVectorizationPlanner.h.

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

◆ createOr()

VPValue* llvm::VPBuilder::createOr ( VPValue LHS,
VPValue RHS,
DebugLoc  DL 
)
inline

Definition at line 147 of file LoopVectorizationPlanner.h.

References DL, LHS, and RHS.

◆ createSelect()

VPValue* llvm::VPBuilder::createSelect ( VPValue Cond,
VPValue TrueVal,
VPValue FalseVal,
DebugLoc  DL 
)
inline

◆ getInsertBlock()

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

Definition at line 71 of file LoopVectorizationPlanner.h.

References BB.

◆ getInsertPoint()

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

Definition at line 72 of file LoopVectorizationPlanner.h.

◆ insert()

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

Insert and return the specified instruction.

Definition at line 118 of file LoopVectorizationPlanner.h.

References BB, and I.

◆ restoreIP()

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

Sets the current insert point to a previously-saved location.

Definition at line 95 of file LoopVectorizationPlanner.h.

References clearInsertionPoint(), and setInsertPoint().

◆ 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 104 of file LoopVectorizationPlanner.h.

References assert(), and BB.

Referenced by 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 112 of file LoopVectorizationPlanner.h.

References BB.


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