|
LLVM
7.0.0
|
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) |
| 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 | 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 1120 of file VPlan.h.
References llvm::tgtok::Def, and llvm::VPBlockBase::deleteCFG().
|
inline |
Add VPVal to the pool of external definitions if it's not already in the pool.
Definition at line 1147 of file VPlan.h.
References llvm::SmallPtrSetImpl< PtrType >::insert().
|
inline |
Definition at line 1137 of file VPlan.h.
References llvm::SmallSet< T, N, C >::insert().
|
inline |
Definition at line 1151 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 290 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, Indent, llvm::VPRegionBlock::isReplicator(), llvm::VPTransformState::CFGState::LastBB, llvm::VPTransformState::LI, llvm_unreachable, llvm::MergeBlockIntoPredecessor(), llvm::RISCVFenceField::O, llvm::pred_size(), 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, and llvm::VPTransformState::VPValue2Value.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1157 of file VPlan.h.
References assert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count().
Definition at line 1139 of file VPlan.h.
References llvm::SmallSet< T, N, C >::count().
|
inline |
Definition at line 1143 of file VPlan.h.
References llvm::Twine::str().
|
friend |
1.8.13