LLVM  8.0.1
Public Types | Public Member Functions | 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, VPWidenIntOrFpInductionSC, VPWidenMemoryInstructionSC, VPWidenPHISC, VPWidenSC, }
 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) 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...
 
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...
 

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 551 of file VPlan.h.

Member Typedef Documentation

◆ VPRecipeTy

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

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 576 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPRecipeBase()

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

Definition at line 578 of file VPlan.h.

◆ ~VPRecipeBase()

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

Member Function Documentation

◆ eraseFromParent()

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

◆ 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 587 of file VPlan.h.

Referenced by insertBefore().

◆ getParent() [2/2]

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

Definition at line 588 of file VPlan.h.

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

◆ getVPRecipeID()

unsigned llvm::VPRecipeBase::getVPRecipeID ( ) const
inline
Returns
an ID for the concrete type of this object. This is used to implement the classof checks. This should not be used for any other purpose, as the values may change as LLVM evolves.

Definition at line 584 of file VPlan.h.

Referenced by llvm::VPInstruction::classof(), llvm::VPWidenRecipe::classof(), llvm::VPWidenIntOrFpInductionRecipe::classof(), llvm::VPWidenPHIRecipe::classof(), llvm::VPBlendRecipe::classof(), llvm::VPInterleaveRecipe::classof(), llvm::VPReplicateRecipe::classof(), llvm::VPBranchOnMaskRecipe::classof(), llvm::VPPredInstPHIRecipe::classof(), and llvm::VPWidenMemoryInstructionRecipe::classof().

◆ insertBefore()

void VPRecipeBase::insertBefore ( VPRecipeBase InsertPos)

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

Definition at line 278 of file VPlan.cpp.

References llvm::ilist_node_impl< OptionsT >::getIterator(), and getParent().

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

◆ print()

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

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