LLVM  6.0.0svn
Public Member Functions | 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...
 
VPBlockBasegetEntry ()
 
const VPBlockBasegetEntry () const
 
VPBlockBasesetEntry (VPBlockBase *Block)
 
void addVF (unsigned VF)
 
bool hasVF (unsigned VF)
 
const std::string & getName () const
 
void setName (const Twine &newName)
 

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

Constructor & Destructor Documentation

◆ VPlan()

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

Definition at line 634 of file VPlan.h.

◆ ~VPlan()

llvm::VPlan::~VPlan ( )
inline

Definition at line 636 of file VPlan.h.

References llvm::VPBlockBase::deleteCFG().

Member Function Documentation

◆ addVF()

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

Definition at line 649 of file VPlan.h.

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

◆ execute()

void VPlan::execute ( struct VPTransformState State)

Generate the IR code for this VPlan.

Generate the code inside the body of the vectorized loop.

Assumes a single LoopVectorBody basic-block was created for this. Introduce additional basic-blocks as needed, and fill them all.

Definition at line 218 of file VPlan.cpp.

References llvm::LoopBase< BlockT, LoopT >::addBasicBlockToLoop(), llvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(), assert(), llvm::VPTransformState::Builder, llvm::VPTransformState::CFG, llvm::BranchInst::Create(), llvm::IRBuilder< T, Inserter >::CreateUnreachable(), llvm::Depth, llvm::depth_first(), llvm::VPTransformState::DT, E, llvm::Instruction::eraseFromParent(), llvm::DOT::EscapeString(), llvm::raw_ostream::flush(), llvm::VPRegionBlock::getEntry(), llvm::VPBlockBase::getEntryBasicBlock(), llvm::VPBlockBase::getExitBasicBlock(), llvm::BasicBlock::getFirstInsertionPt(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::VPBlockBase::getName(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getSingleSuccessor(), llvm::VPBlockBase::getSuccessors(), llvm::BasicBlock::getTerminator(), llvm::cl::Hidden, I, llvm::VPRegionBlock::isReplicator(), llvm::VPTransformState::CFGState::LastBB, llvm::VPTransformState::LI, llvm_unreachable, llvm::MergeBlockIntoPredecessor(), llvm::RISCVFenceField::O, llvm::pred_begin(), llvm::pred_end(), llvm::VPTransformState::CFGState::PrevBB, llvm::VPTransformState::CFGState::PrevVPBB, llvm::Value::printAsOperand(), llvm::IRBuilderBase::SetInsertPoint(), llvm::BasicBlock::splitBasicBlock(), llvm::succ_begin(), llvm::succ_end(), llvm::Successor, and llvm::MCID::Terminator.

◆ getEntry() [1/2]

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

Definition at line 644 of file VPlan.h.

◆ getEntry() [2/2]

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

Definition at line 645 of file VPlan.h.

◆ getName()

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

Definition at line 653 of file VPlan.h.

◆ hasVF()

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

Definition at line 651 of file VPlan.h.

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

◆ setEntry()

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

Definition at line 647 of file VPlan.h.

◆ setName()

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

Definition at line 655 of file VPlan.h.

References llvm::Twine::str().


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