LLVM  10.0.0
Public Member Functions | Friends | List of all members
llvm::VPlan Class Reference

VPlan models a candidate for vectorization, encoding various decisions take to produce efficient output IR, including which branches, basic-blocks and output IR instructions to generate, and their cost. More...

#include "Transforms/Vectorize/VPlan.h"

Public Member Functions

 VPlan (VPBlockBase *Entry=nullptr)
 
 ~VPlan ()
 
void execute (struct VPTransformState *State)
 Generate the IR code for this VPlan. More...
 
VPBlockBase * getEntry ()
 
const VPBlockBase * getEntry () const
 
VPBlockBase * setEntry (VPBlockBase *Block)
 
VPValue * getOrCreateBackedgeTakenCount ()
 The backedge taken count of the original loop. More...
 
void addVF (unsigned VF)
 
bool hasVF (unsigned VF)
 
const std::string & getName () const
 
void setName (const Twine &newName)
 
void addExternalDef (VPValue *VPVal)
 Add VPVal to the pool of external definitions if it's not already in the pool. More...
 
void addCBV (VPValue *CBV)
 Add CBV to the vector of condition bit values. More...
 
void addVPValue (Value *V)
 
VPValue * getVPValue (Value *V)
 
VPValue * getOrAddVPValue (Value *V)
 
VPLoopInfo & getVPLoopInfo ()
 Return the VPLoopInfo analysis for this VPlan. More...
 
const VPLoopInfo & getVPLoopInfo () const
 
void dump () const
 Dump the plan to stderr (for debugging). More...
 

Friends

class VPlanPrinter
 

Detailed Description

VPlan models a candidate for vectorization, encoding various decisions take to produce efficient output IR, including which branches, basic-blocks and output IR instructions to generate, and their cost.

VPlan holds a Hierarchical-CFG of VPBasicBlocks and VPRegionBlocks rooted at an Entry VPBlock.

Definition at line 1348 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPlan()

llvm::VPlan::VPlan ( VPBlockBase *  Entry = nullptr)
inline

Definition at line 1383 of file VPlan.h.

◆ ~VPlan()

llvm::VPlan::~VPlan ( )
inline

Definition at line 1385 of file VPlan.h.

References llvm::tgtok::Def, and llvm::VPBlockBase::deleteCFG().

Member Function Documentation

◆ addCBV()

void llvm::VPlan::addCBV ( VPValue *  CBV)
inline

Add CBV to the vector of condition bit values.

Definition at line 1429 of file VPlan.h.

References llvm::SmallVectorTemplateBase< T >::push_back().

◆ addExternalDef()

void llvm::VPlan::addExternalDef ( VPValue *  VPVal)
inline

Add VPVal to the pool of external definitions if it's not already in the pool.

Definition at line 1424 of file VPlan.h.

References llvm::SmallPtrSetImpl< PtrType >::insert().

◆ addVF()

void llvm::VPlan::addVF ( unsigned  VF)
inline

Definition at line 1414 of file VPlan.h.

References llvm::SmallSet< T, N, C >::insert().

◆ addVPValue()

void llvm::VPlan::addVPValue ( Value *  V)
inline

◆ dump()

LLVM_DUMP_METHOD void VPlan::dump ( ) const

◆ execute()

void VPlan::execute ( struct VPTransformState *  State)

◆ getEntry() [1/2]

VPBlockBase* llvm::VPlan::getEntry ( )
inline

◆ getEntry() [2/2]

const VPBlockBase* llvm::VPlan::getEntry ( ) const
inline

Definition at line 1403 of file VPlan.h.

◆ getName()

const std::string& llvm::VPlan::getName ( ) const
inline

Definition at line 1418 of file VPlan.h.

References Name.

◆ getOrAddVPValue()

VPValue* llvm::VPlan::getOrAddVPValue ( Value *  V)
inline

◆ getOrCreateBackedgeTakenCount()

VPValue* llvm::VPlan::getOrCreateBackedgeTakenCount ( )
inline

The backedge taken count of the original loop.

Definition at line 1408 of file VPlan.h.

◆ getVPLoopInfo() [1/2]

VPLoopInfo& llvm::VPlan::getVPLoopInfo ( )
inline

Return the VPLoopInfo analysis for this VPlan.

Definition at line 1453 of file VPlan.h.

◆ getVPLoopInfo() [2/2]

const VPLoopInfo& llvm::VPlan::getVPLoopInfo ( ) const
inline

Definition at line 1454 of file VPlan.h.

References llvm::dump().

◆ getVPValue()

VPValue* llvm::VPlan::getVPValue ( Value *  V)
inline

◆ hasVF()

bool llvm::VPlan::hasVF ( unsigned  VF)
inline

Definition at line 1416 of file VPlan.h.

References llvm::SmallSet< T, N, C >::count().

◆ setEntry()

VPBlockBase* llvm::VPlan::setEntry ( VPBlockBase *  Block)
inline

Definition at line 1405 of file VPlan.h.

◆ setName()

void llvm::VPlan::setName ( const Twine &  newName)
inline

Definition at line 1420 of file VPlan.h.

References llvm::Twine::str().

Friends And Related Function Documentation

◆ VPlanPrinter

friend class VPlanPrinter
friend

Definition at line 1349 of file VPlan.h.


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