LLVM 22.0.0git
|
This is the LLVM vectorization plan. More...
#include "VPlan.h"
#include "LoopVectorizationPlanner.h"
#include "VPlanCFG.h"
#include "VPlanDominatorTree.h"
#include "VPlanHelpers.h"
#include "VPlanPatternMatch.h"
#include "VPlanTransforms.h"
#include "VPlanUtils.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/LoopVersioning.h"
#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
#include <cassert>
#include <string>
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. |
Macros | |
#define | DEBUG_TYPE "loop-vectorize" |
Functions | |
template<typename T> | |
static T * | getPlanEntry (T *Start) |
template<typename T> | |
static T * | getEnclosingLoopRegionForRegion (T *P) |
Return the enclosing loop region for region P . | |
static bool | hasConditionalTerminator (const VPBasicBlock *VPBB) |
static std::pair< VPBlockBase *, VPBlockBase * > | cloneFrom (VPBlockBase *Entry) |
static void | remapOperands (VPBlockBase *Entry, VPBlockBase *NewEntry, DenseMap< VPValue *, VPValue * > &Old2NewVPValues) |
static bool | isDefinedInsideLoopRegions (const VPValue *VPV) |
Returns true if there is a vector loop region and VPV is defined in a loop region. | |
static void | addRuntimeUnrollDisableMetaData (Loop *L) |
Variables | |
cl::opt< unsigned > | ForceTargetInstructionCost |
static cl::opt< bool > | PrintVPlansInDotFormat ("vplan-print-in-dot-format", cl::Hidden, cl::desc("Use dot format instead of plain text when dumping VPlans")) |
const char | LLVMLoopVectorizeFollowupAll [] = "llvm.loop.vectorize.followup_all" |
const char | LLVMLoopVectorizeFollowupVectorized [] |
const char | LLVMLoopVectorizeFollowupEpilogue [] |
This is the LLVM vectorization plan.
It represents a candidate for vectorization, allowing to plan and optimize how to vectorize a given loop before generating LLVM-IR. The vectorizer uses vectorization plans to estimate the costs of potential candidates and if profitable to execute the desired plan, generating vector LLVM-IR code.
Definition in file VPlan.cpp.
|
static |
Definition at line 1624 of file VPlan.cpp.
References llvm::dyn_cast(), llvm::MDNode::get(), llvm::MDString::get(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), I, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::MDNode::replaceOperandWith().
Referenced by llvm::LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo().
|
static |
Definition at line 719 of file VPlan.cpp.
References assert(), llvm::VPBlockBase::getParent(), llvm::VPBlockBase::getPredecessors(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::VPBlockBase::setPredecessors(), llvm::VPBlockBase::setSuccessors(), llvm::VPBlockBase::successors(), llvm::vp_depth_first_shallow(), and llvm::zip().
Referenced by llvm::VPRegionBlock::clone(), and llvm::VPlan::duplicate().
Return the enclosing loop region for region P
.
The templated version is used to support both const and non-const block arguments.
Definition at line 609 of file VPlan.cpp.
References assert(), P, and T.
Referenced by llvm::VPBasicBlock::getEnclosingLoopRegion(), and llvm::VPBasicBlock::getEnclosingLoopRegion().
Definition at line 145 of file VPlan.cpp.
References llvm::SetVector< T, Vector, Set, N >::insert(), llvm::SetVector< T, Vector, Set, N >::insert_range(), llvm_unreachable, llvm::Next, llvm::SetVector< T, Vector, Set, N >::size(), and T.
Referenced by llvm::VPBlockBase::getPlan(), and llvm::VPBlockBase::getPlan().
|
static |
Definition at line 627 of file VPlan.cpp.
References assert(), llvm::VPBasicBlock::back(), llvm::cast(), llvm::VPBasicBlock::empty(), llvm::VPBlockBase::getNumSuccessors(), llvm::VPBlockBase::getParent(), llvm::isa(), IsCondBranch(), llvm::VPBasicBlock::isExiting(), llvm::VPRegionBlock::isReplicator(), llvm::VPlanPatternMatch::m_BranchOnCond(), llvm::VPlanPatternMatch::m_BranchOnCount(), llvm::VPlanPatternMatch::m_VPValue(), and llvm::PatternMatch::match().
Referenced by llvm::VPBasicBlock::getTerminator(), and llvm::VPBasicBlock::getTerminator().
Returns true if there is a vector loop region and VPV
is defined in a loop region.
Definition at line 1403 of file VPlan.cpp.
References llvm::VPValue::getDefiningRecipe(), llvm::VPBasicBlock::getEnclosingLoopRegion(), and llvm::VPRecipeBase::getParent().
Referenced by llvm::VPValue::isDefinedOutsideLoopRegions().
|
static |
Definition at line 1150 of file VPlan.cpp.
References assert(), llvm::VPBlockUtils::blocksOnly(), E(), I, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), llvm::BasicBlock::size(), and llvm::zip().
Referenced by llvm::VPlan::duplicate().
Metadata attribute names
Definition at line 61 of file VPlan.cpp.
Referenced by llvm::LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo().
Definition at line 64 of file VPlan.cpp.
Referenced by llvm::LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo().
Definition at line 62 of file VPlan.cpp.
Referenced by llvm::LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo().
|
static |
Referenced by llvm::LoopVectorizationPlanner::printPlans().