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

Inherited from VPUser:

Inherited from VPDef:

Methods

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)

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)

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:729

Parameters

const llvm::VPUser* U

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()

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)

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()

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:678

Returns

the VPBasicBlock which this VPRecipe belongs to.

const llvm::VPBasicBlock* getParent() const

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:679

const llvm::Instruction* getUnderlyingInstr()
    const

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:719

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)

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)

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)

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

Description

Returns true for PHI-like recipes.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:737

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

Description

Returns true if the recipe may read from memory.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:742

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

Description

Returns true if the recipe may write to memory.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:745

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)

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()

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()

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:675