LLVM  12.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::VPRecipeBase Class Referenceabstract

VPRecipeBase is a base class modeling a sequence of one or more output IR instructions. More...

#include "Transforms/Vectorize/VPlan.h"

Inheritance diagram for llvm::VPRecipeBase:
Inheritance graph
[legend]
Collaboration diagram for llvm::VPRecipeBase:
Collaboration graph
[legend]

Public Types

using VPRecipeTy = enum { VPBlendSC, VPBranchOnMaskSC, VPInstructionSC, VPInterleaveSC, VPPredInstPHISC, VPReplicateSC, VPWidenCallSC, VPWidenCanonicalIVSC, VPWidenGEPSC, VPWidenIntOrFpInductionSC, VPWidenMemoryInstructionSC, VPWidenPHISC, VPWidenSC, VPWidenSelectSC }
 An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiated. More...
 

Public Member Functions

 VPRecipeBase (const unsigned char SC)
 
virtual ~VPRecipeBase ()=default
 
unsigned getVPRecipeID () const
 
VPBasicBlockgetParent ()
 
const VPBasicBlockgetParent () const
 
virtual void execute (struct VPTransformState &State)=0
 The method which generates the output IR instructions that correspond to this VPRecipe, thereby "executing" the VPlan. More...
 
virtual void print (raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const =0
 Each recipe prints itself. More...
 
void insertBefore (VPRecipeBase *InsertPos)
 Insert an unlinked recipe into a basic block immediately before the specified recipe. More...
 
void insertAfter (VPRecipeBase *InsertPos)
 Insert an unlinked Recipe into a basic block immediately after the specified Recipe. More...
 
void moveAfter (VPRecipeBase *MovePos)
 Unlink this recipe from its current VPBasicBlock and insert it into the VPBasicBlock that MovePos lives in, right after MovePos. More...
 
void removeFromParent ()
 This method unlinks 'this' from the containing basic block, but does not delete it. More...
 
iplist< VPRecipeBase >::iterator eraseFromParent ()
 This method unlinks 'this' from the containing basic block and deletes it. More...
 
- Public Member Functions inherited from llvm::ilist_node_with_parent< VPRecipeBase, VPBasicBlock >
VPRecipeBasegetPrevNode ()
 
const VPRecipeBasegetPrevNode () const
 Get the previous node, or nullptr for the list head. More...
 
VPRecipeBasegetNextNode ()
 Get the next node, or nullptr for the list tail. More...
 
const VPRecipeBasegetNextNode () const
 Get the next node, or nullptr for the list tail. More...
 
- Public Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type >
self_iterator getIterator ()
 
const_self_iterator getIterator () const
 
reverse_self_iterator getReverseIterator ()
 
const_reverse_self_iterator getReverseIterator () const
 
bool isSentinel () const
 Check whether this is the sentinel node. More...
 

Friends

class VPBlockUtils
 

Additional Inherited Members

- Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type >
using self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, false, false >
 
using const_self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, false, true >
 
using reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, true, false >
 
using const_reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type, true, true >
 
- Protected Member Functions inherited from llvm::ilist_node_with_parent< VPRecipeBase, VPBasicBlock >
 ilist_node_with_parent ()=default
 
- Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< VPRecipeBase, Options... >::type >
 ilist_node_impl ()=default
 

Detailed Description

VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.

Definition at line 601 of file VPlan.h.

Member Typedef Documentation

◆ VPRecipeTy

using llvm::VPRecipeBase::VPRecipeTy = enum { VPBlendSC, VPBranchOnMaskSC, VPInstructionSC, VPInterleaveSC, VPPredInstPHISC, VPReplicateSC, VPWidenCallSC, VPWidenCanonicalIVSC, VPWidenGEPSC, VPWidenIntOrFpInductionSC, VPWidenMemoryInstructionSC, VPWidenPHISC, VPWidenSC, VPWidenSelectSC }

An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiated.

Values of this enumeration are kept in the SubclassID field of the VPRecipeBase objects. They are used for concrete type identification.

Definition at line 630 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPRecipeBase()

llvm::VPRecipeBase::VPRecipeBase ( const unsigned char  SC)
inline

Definition at line 632 of file VPlan.h.

◆ ~VPRecipeBase()

virtual llvm::VPRecipeBase::~VPRecipeBase ( )
virtualdefault

Member Function Documentation

◆ eraseFromParent()

iplist< VPRecipeBase >::iterator VPRecipeBase::eraseFromParent ( )

This method unlinks 'this' from the containing basic block and deletes it.

Returns
an iterator pointing to the element after the erased one

Definition at line 339 of file VPlan.cpp.

References assert(), and getParent().

Referenced by llvm::VPlanTransforms::VPInstructionsToVPRecipes().

◆ execute()

virtual void llvm::VPRecipeBase::execute ( struct VPTransformState State)
pure virtual

◆ getParent() [1/2]

VPBasicBlock* llvm::VPRecipeBase::getParent ( )
inline
Returns
the VPBasicBlock which this VPRecipe belongs to.

Definition at line 641 of file VPlan.h.

Referenced by insertAfter(), insertBefore(), and llvm::operator<<().

◆ getParent() [2/2]

const VPBasicBlock* llvm::VPRecipeBase::getParent ( ) const
inline

Definition at line 642 of file VPlan.h.

References llvm::RISCVFenceField::O, and print().

◆ getVPRecipeID()

unsigned llvm::VPRecipeBase::getVPRecipeID ( ) const
inline

◆ insertAfter()

void VPRecipeBase::insertAfter ( VPRecipeBase InsertPos)

Insert an unlinked Recipe into a basic block immediately after the specified Recipe.

Definition at line 325 of file VPlan.cpp.

References assert(), llvm::ilist_node_impl< OptionsT >::getIterator(), getParent(), llvm::VPBasicBlock::getRecipeList(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insertAfter().

◆ insertBefore()

void VPRecipeBase::insertBefore ( VPRecipeBase InsertPos)

Insert an unlinked recipe into a basic block immediately before the specified recipe.

Definition at line 317 of file VPlan.cpp.

References assert(), llvm::ilist_node_impl< OptionsT >::getIterator(), getParent(), llvm::VPBasicBlock::getRecipeList(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insert().

Referenced by llvm::VPlanTransforms::VPInstructionsToVPRecipes().

◆ moveAfter()

void VPRecipeBase::moveAfter ( VPRecipeBase MovePos)

◆ print()

virtual void llvm::VPRecipeBase::print ( raw_ostream O,
const Twine Indent,
VPSlotTracker SlotTracker 
) const
pure virtual

◆ removeFromParent()

void VPRecipeBase::removeFromParent ( )

This method unlinks 'this' from the containing basic block, but does not delete it.

Definition at line 333 of file VPlan.cpp.

References assert(), and getParent().

Friends And Related Function Documentation

◆ VPBlockUtils

friend class VPBlockUtils
friend

Definition at line 603 of file VPlan.h.


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