LLVM  7.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::VPBasicBlock Class Reference

VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph. More...

#include "Transforms/Vectorize/VPlan.h"

Inheritance diagram for llvm::VPBasicBlock:
[legend]
Collaboration diagram for llvm::VPBasicBlock:
[legend]

Public Types

using RecipeListTy = iplist< VPRecipeBase >
 
using iterator = RecipeListTy::iterator
 Instruction iterators... More...
 
using const_iterator = RecipeListTy::const_iterator
 
using reverse_iterator = RecipeListTy::reverse_iterator
 
using const_reverse_iterator = RecipeListTy::const_reverse_iterator
 
- Public Types inherited from llvm::VPBlockBase
using VPBlockTy = enum { VPBasicBlockSC, VPRegionBlockSC }
 An enumeration for keeping track of the concrete subclass of VPBlockBase that are actually instantiated. More...
 
using VPBlocksTy = SmallVectorImpl< VPBlockBase * >
 

Public Member Functions

 VPBasicBlock (const Twine &Name="", VPRecipeBase *Recipe=nullptr)
 
 ~VPBasicBlock () override
 
iterator begin ()
 Recipe iterator methods. More...
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_t size () const
 
bool empty () const
 
const VPRecipeBase & front () const
 
VPRecipeBase & front ()
 
const VPRecipeBase & back () const
 
VPRecipeBase & back ()
 
RecipeListTy & getRecipeList ()
 Returns a reference to the list of recipes. More...
 
void insert (VPRecipeBase *Recipe, iterator InsertPt)
 
void appendRecipe (VPRecipeBase *Recipe)
 Augment the existing recipes of a VPBasicBlock with an additional Recipe as the last recipe. More...
 
void execute (struct VPTransformState *State) override
 The method which generates the output IR instructions that correspond to this VPBasicBlock, thereby "executing" the VPlan. More...
 
- Public Member Functions inherited from llvm::VPBlockBase
virtual ~VPBlockBase ()=default
 
const std::string & getName () const
 
void setName (const Twine &newName)
 
unsigned getVPBlockID () const
 
VPRegionBlock * getParent ()
 
const VPRegionBlock * getParent () const
 
void setParent (VPRegionBlock *P)
 
const VPBasicBlock * getEntryBasicBlock () const
 
VPBasicBlock * getEntryBasicBlock ()
 
const VPBasicBlock * getExitBasicBlock () const
 
VPBasicBlock * getExitBasicBlock ()
 
const VPBlocksTy & getSuccessors () const
 
VPBlocksTy & getSuccessors ()
 
const VPBlocksTy & getPredecessors () const
 
VPBlocksTy & getPredecessors ()
 
VPBlockBase * getSingleSuccessor () const
 
VPBlockBase * getSinglePredecessor () const
 
size_t getNumSuccessors () const
 
size_t getNumPredecessors () const
 
VPBlockBase * getEnclosingBlockWithSuccessors ()
 An Enclosing Block of a block B is any block containing B, including B itself. More...
 
VPBlockBase * getEnclosingBlockWithPredecessors ()
 
const VPBlocksTy & getHierarchicalSuccessors ()
 
VPBlockBase * getSingleHierarchicalSuccessor ()
 
const VPBlocksTy & getHierarchicalPredecessors ()
 
VPBlockBase * getSingleHierarchicalPredecessor ()
 
VPValue * getCondBit ()
 
const VPValue * getCondBit () const
 
void setCondBit (VPValue *CV)
 
void setOneSuccessor (VPBlockBase *Successor)
 Set a given VPBlockBase Successor as the single successor of this VPBlockBase. More...
 
void setTwoSuccessors (VPBlockBase *IfTrue, VPBlockBase *IfFalse, VPValue *Condition)
 Set two given VPBlockBases IfTrue and IfFalse to be the two successors of this VPBlockBase. More...
 
void setPredecessors (ArrayRef< VPBlockBase *> NewPreds)
 Set each VPBasicBlock in NewPreds as predecessor of this VPBlockBase. More...
 
void printAsOperand (raw_ostream &OS, bool PrintType) const
 
void print (raw_ostream &OS) const
 
bool isLegalToHoistInto ()
 Return true if it is legal to hoist instructions into this block. More...
 

Static Public Member Functions

static RecipeListTy VPBasicBlock::* getSublistAccess (VPRecipeBase *)
 Returns a pointer to a member of the recipe list. More...
 
static bool classof (const VPBlockBase *V)
 Method to support type inquiry through isa, cast, and dyn_cast. More...
 
- Static Public Member Functions inherited from llvm::VPBlockBase
static void deleteCFG (VPBlockBase *Entry)
 Delete all blocks reachable from a given VPBlockBase, inclusive. More...
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::VPBlockBase
 VPBlockBase (const unsigned char SC, const std::string &N)
 

Detailed Description

VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph.

It holds a sequence of zero or more VPRecipe's each representing a sequence of output IR instructions.

Definition at line 925 of file VPlan.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 944 of file VPlan.h.

◆ const_reverse_iterator

Definition at line 946 of file VPlan.h.

◆ iterator

Instruction iterators...

Definition at line 943 of file VPlan.h.

◆ RecipeListTy

Definition at line 927 of file VPlan.h.

◆ reverse_iterator

Definition at line 945 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPBasicBlock()

llvm::VPBasicBlock::VPBasicBlock ( const Twine &  Name = "",
VPRecipeBase *  Recipe = nullptr 
)
inline

Definition at line 934 of file VPlan.h.

◆ ~VPBasicBlock()

llvm::VPBasicBlock::~VPBasicBlock ( )
inlineoverride

Definition at line 940 of file VPlan.h.

References llvm::iplist_impl< IntrusiveListT, TraitsT >::clear().

Member Function Documentation

◆ appendRecipe()

void llvm::VPBasicBlock::appendRecipe ( VPRecipeBase *  Recipe)
inline

Augment the existing recipes of a VPBasicBlock with an additional Recipe as the last recipe.

Definition at line 990 of file VPlan.h.

References CFG, and llvm::sys::path::end().

Referenced by llvm::VPRecipeBuilder::handleReplication(), llvm::VPRecipeBuilder::tryToCreateRecipe(), and llvm::VPRecipeBuilder::tryToWiden().

◆ back() [1/2]

const VPRecipeBase& llvm::VPBasicBlock::back ( ) const
inline

Definition at line 965 of file VPlan.h.

Referenced by llvm::VPRecipeBuilder::tryToWiden().

◆ back() [2/2]

VPRecipeBase& llvm::VPBasicBlock::back ( )
inline

Definition at line 966 of file VPlan.h.

◆ begin() [1/2]

iterator llvm::VPBasicBlock::begin ( )
inline

Recipe iterator methods.

Definition at line 951 of file VPlan.h.

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

◆ begin() [2/2]

const_iterator llvm::VPBasicBlock::begin ( ) const
inline

Definition at line 952 of file VPlan.h.

◆ classof()

static bool llvm::VPBasicBlock::classof ( const VPBlockBase *  V)
inlinestatic

Method to support type inquiry through isa, cast, and dyn_cast.

Definition at line 977 of file VPlan.h.

References llvm::VPBlockBase::getVPBlockID().

◆ empty()

bool llvm::VPBasicBlock::empty ( ) const
inline

◆ end() [1/2]

iterator llvm::VPBasicBlock::end ( )
inline

◆ end() [2/2]

const_iterator llvm::VPBasicBlock::end ( ) const
inline

Definition at line 954 of file VPlan.h.

◆ execute()

void VPBasicBlock::execute ( struct VPTransformState *  State)
overridevirtual

◆ front() [1/2]

const VPRecipeBase& llvm::VPBasicBlock::front ( ) const
inline

Definition at line 963 of file VPlan.h.

◆ front() [2/2]

VPRecipeBase& llvm::VPBasicBlock::front ( )
inline

Definition at line 964 of file VPlan.h.

◆ getRecipeList()

RecipeListTy& llvm::VPBasicBlock::getRecipeList ( )
inline

Returns a reference to the list of recipes.

Definition at line 969 of file VPlan.h.

◆ getSublistAccess()

static RecipeListTy VPBasicBlock::* llvm::VPBasicBlock::getSublistAccess ( VPRecipeBase *  )
inlinestatic

Returns a pointer to a member of the recipe list.

Definition at line 972 of file VPlan.h.

◆ insert()

void llvm::VPBasicBlock::insert ( VPRecipeBase *  Recipe,
iterator  InsertPt 
)
inline

Definition at line 981 of file VPlan.h.

References assert(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insert().

Referenced by llvm::VPBuilder::insert().

◆ rbegin() [1/2]

reverse_iterator llvm::VPBasicBlock::rbegin ( )
inline

Definition at line 956 of file VPlan.h.

◆ rbegin() [2/2]

const_reverse_iterator llvm::VPBasicBlock::rbegin ( ) const
inline

Definition at line 957 of file VPlan.h.

◆ rend() [1/2]

reverse_iterator llvm::VPBasicBlock::rend ( )
inline

Definition at line 958 of file VPlan.h.

◆ rend() [2/2]

const_reverse_iterator llvm::VPBasicBlock::rend ( ) const
inline

Definition at line 959 of file VPlan.h.

◆ size()

size_t llvm::VPBasicBlock::size ( ) const
inline

Definition at line 961 of file VPlan.h.


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