LLVM
8.0.1
|
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) |
VPLoopInfo & | getVPLoopInfo () |
Return the VPLoopInfo analysis for this VPlan. More... | |
const VPLoopInfo & | getVPLoopInfo () const |
Friends | |
class | VPlanPrinter |
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.
|
inline |
|
inline |
Definition at line 1167 of file VPlan.h.
References llvm::tgtok::Def, and llvm::VPBlockBase::deleteCFG().
|
inline |
Add CBV
to the vector of condition bit values.
Definition at line 1211 of file VPlan.h.
References llvm::SmallVectorTemplateBase< T >::push_back().
|
inline |
Add VPVal
to the pool of external definitions if it's not already in the pool.
Definition at line 1206 of file VPlan.h.
References llvm::SmallPtrSetImpl< PtrType >::insert().
|
inline |
Definition at line 1196 of file VPlan.h.
References llvm::SmallSet< T, N, C >::insert().
|
inline |
Definition at line 1215 of file VPlan.h.
References assert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count().
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 360 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 >::CreateSub(), llvm::IRBuilder< T, Inserter >::CreateUnreachable(), llvm::Depth, llvm::depth_first(), llvm::VPTransformState::DT, E, llvm::Instruction::eraseFromParent(), llvm::DOT::EscapeString(), llvm::raw_ostream::flush(), From, llvm::ConstantInt::get(), llvm::VPRegionBlock::getEntry(), llvm::VPBlockBase::getEntryBasicBlock(), llvm::VPBlockBase::getExitBasicBlock(), llvm::BasicBlock::getFirstInsertionPt(), llvm::VPBlockBase::getHierarchicalSuccessors(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::VPBlockBase::getName(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlock::getSingleSuccessor(), llvm::VPBlockBase::getSuccessors(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::cl::Hidden, I, Indent, llvm::VPRegionBlock::isReplicator(), llvm::VPTransformState::CFGState::LastBB, llvm::VPTransformState::LI, llvm_unreachable, llvm::MergeBlockIntoPredecessor(), llvm::RISCVFenceField::O, llvm::VPTransformState::CFGState::PrevBB, llvm::VPTransformState::CFGState::PrevVPBB, llvm::VPValue::printAsOperand(), llvm::Value::printAsOperand(), llvm::IRBuilderBase::SetInsertPoint(), llvm::BasicBlock::splitBasicBlock(), llvm::succ_begin(), llvm::succ_end(), llvm::Successor, llvm::MCID::Terminator, llvm::VPTransformState::TripCount, llvm::VPTransformState::CFGState::VPBB2IRBB, llvm::VPTransformState::CFGState::VPBBsToFix, and llvm::VPTransformState::VPValue2Value.
|
inline |
Definition at line 1184 of file VPlan.h.
Referenced by llvm::VPInterleavedAccessInfo::VPInterleavedAccessInfo().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1221 of file VPlan.h.
References assert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count().
Definition at line 1198 of file VPlan.h.
References llvm::SmallSet< T, N, C >::count().
|
inline |
Definition at line 1202 of file VPlan.h.
References llvm::Twine::str().
|
friend |