class VPRecipeBase
Declaration
class VPRecipeBase : public ilist_node_with_parent,
public VPDef,
public VPUser { /* full declaration omitted */ };
Description
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions. VPRecipeBase owns the the VPValues it defines through VPDef and is responsible for deleting its defined values. Single-value VPRecipeBases that also inherit from VPValue must make sure to inherit from VPRecipeBase before VPValue.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:659
Inherits from: ilist_node_with_parent, VPDef, VPUser
Member Variables
- private llvm::VPBasicBlock* Parent = nullptr
- Each VPRecipe belongs to a single VPBasicBlock.
Method Overview
- public template <typename IterT> VPRecipeBase(const unsigned char SC, iterator_range<IterT> Operands)
- public VPRecipeBase(const unsigned char SC, ArrayRef<llvm::VPValue *> Operands)
- public static inline bool classof(const llvm::VPUser * U)
- public static inline bool classof(const llvm::VPDef * D)
- public iplist<VPRecipeBase>::iterator eraseFromParent()
- public virtual void execute(struct VPTransformState & State)
- public llvm::VPBasicBlock * getParent()
- public const llvm::VPBasicBlock * getParent() const
- public const llvm::Instruction * getUnderlyingInstr() const
- public llvm::Instruction * getUnderlyingInstr()
- public void insertAfter(llvm::VPRecipeBase * InsertPos)
- public void insertBefore(llvm::VPBasicBlock & BB, iplist<VPRecipeBase>::iterator IP)
- public void insertBefore(llvm::VPRecipeBase * InsertPos)
- public bool isPhi() const
- public bool mayHaveSideEffects() const
- public bool mayReadFromMemory() const
- public bool mayReadOrWriteMemory() const
- public bool mayWriteToMemory() const
- public void moveAfter(llvm::VPRecipeBase * MovePos)
- public void moveBefore(llvm::VPBasicBlock & BB, iplist<VPRecipeBase>::iterator I)
- public void removeFromParent()
- public virtual ~VPRecipeBase()
Inherited from VPUser:
- public addOperand
- public classof
- public getNumOperands
- public getOperand
- public getVPUserID
- public onlyFirstLaneUsed
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operands
- public operands
- protected printOperands
- public removeLastOperand
- public setOperand
- public usesScalars
Inherited from VPDef:
- public definedValues
- public definedValues
- public dump
- public getNumDefinedValues
- public getVPDefID
- public getVPSingleValue
- public getVPSingleValue
- public getVPValue
- public getVPValue
- public print
Methods
¶template <typename IterT>
VPRecipeBase(const unsigned char SC,
iterator_range<IterT> Operands)
template <typename IterT>
VPRecipeBase(const unsigned char SC,
iterator_range<IterT> Operands)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:673
Templates
- IterT
Parameters
- const unsigned char SC
- iterator_range<IterT> Operands
¶VPRecipeBase(const unsigned char SC,
ArrayRef<llvm::VPValue*> Operands)
VPRecipeBase(const unsigned char SC,
ArrayRef<llvm::VPValue*> Operands)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:669
Parameters
- const unsigned char SC
- ArrayRef<llvm::VPValue*> Operands
¶static inline bool classof(const llvm::VPUser* U)
static inline bool classof(const llvm::VPUser* U)
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:729
Parameters
- const llvm::VPUser* U
¶static inline bool classof(const llvm::VPDef* D)
static inline bool classof(const llvm::VPDef* D)
Description
Method to support type inquiry through isa, cast, and dyn_cast.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:724
Parameters
- const llvm::VPDef* D
¶iplist<VPRecipeBase>::iterator eraseFromParent()
iplist<VPRecipeBase>::iterator eraseFromParent()
Description
This method unlinks 'this' from the containing basic block and deletes it.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:712
Returns
an iterator pointing to the element after the erased one
¶virtual void execute(
struct VPTransformState& State)
virtual void execute(
struct VPTransformState& State)
Description
The method which generates the output IR instructions that correspond to this VPRecipe, thereby "executing" the VPlan.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:683
Parameters
- struct VPTransformState& State
¶llvm::VPBasicBlock* getParent()
llvm::VPBasicBlock* getParent()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:678
Returns
the VPBasicBlock which this VPRecipe belongs to.
¶const llvm::VPBasicBlock* getParent() const
const llvm::VPBasicBlock* getParent() const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:679
¶const llvm::Instruction* getUnderlyingInstr()
const
const llvm::Instruction* getUnderlyingInstr()
const
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:719
¶llvm::Instruction* getUnderlyingInstr()
llvm::Instruction* getUnderlyingInstr()
Description
Returns the underlying instruction, if the recipe is a VPValue or nullptr otherwise.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:716
¶void insertAfter(llvm::VPRecipeBase* InsertPos)
void insertAfter(llvm::VPRecipeBase* InsertPos)
Description
Insert an unlinked Recipe into a basic block immediately after the specified Recipe.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:694
Parameters
- llvm::VPRecipeBase* InsertPos
¶void insertBefore(
llvm::VPBasicBlock& BB,
iplist<VPRecipeBase>::iterator IP)
void insertBefore(
llvm::VPBasicBlock& BB,
iplist<VPRecipeBase>::iterator IP)
Description
Insert an unlinked recipe into \p BB immediately before the insertion point \p IP;
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:690
Parameters
- llvm::VPBasicBlock& BB
- iplist<VPRecipeBase>::iterator IP
¶void insertBefore(llvm::VPRecipeBase* InsertPos)
void insertBefore(llvm::VPRecipeBase* InsertPos)
Description
Insert an unlinked recipe into a basic block immediately before the specified recipe.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:687
Parameters
- llvm::VPRecipeBase* InsertPos
¶bool isPhi() const
bool isPhi() const
Description
Returns true for PHI-like recipes.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:737
¶bool mayHaveSideEffects() const
bool mayHaveSideEffects() const
Description
Returns true if the recipe may have side-effects.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:734
¶bool mayReadFromMemory() const
bool mayReadFromMemory() const
Description
Returns true if the recipe may read from memory.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:742
¶bool mayReadOrWriteMemory() const
bool mayReadOrWriteMemory() const
Description
Returns true if the recipe may read from or write to memory.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:748
¶bool mayWriteToMemory() const
bool mayWriteToMemory() const
Description
Returns true if the recipe may write to memory.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:745
¶void moveAfter(llvm::VPRecipeBase* MovePos)
void moveAfter(llvm::VPRecipeBase* MovePos)
Description
Unlink this recipe from its current VPBasicBlock and insert it into the VPBasicBlock that MovePos lives in, right after MovePos.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:698
Parameters
- llvm::VPRecipeBase* MovePos
¶void moveBefore(llvm::VPBasicBlock& BB,
iplist<VPRecipeBase>::iterator I)
void moveBefore(llvm::VPBasicBlock& BB,
iplist<VPRecipeBase>::iterator I)
Description
Unlink this recipe and insert into BB before I.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:703
Parameters
- llvm::VPBasicBlock& BB
- iplist<VPRecipeBase>::iterator I
¶void removeFromParent()
void removeFromParent()
Description
This method unlinks 'this' from the containing basic block, but does not delete it.
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:707
¶virtual ~VPRecipeBase()
virtual ~VPRecipeBase()
Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:675