LLVM: llvm::InnerLoopVectorizer Class Reference (original) (raw)

InnerLoopVectorizer vectorizes loops which contain only one basic block to a specified vectorization factor (VF). More...

Public Member Functions
InnerLoopVectorizer (Loop *OrigLoop, PredicatedScalarEvolution &PSE, LoopInfo *LI, DominatorTree *DT, const TargetTransformInfo *TTI, AssumptionCache *AC, ElementCount VecWidth, unsigned UnrollFactor, LoopVectorizationCostModel *CM, GeneratedRTChecks &RTChecks, VPlan &Plan)
virtual ~InnerLoopVectorizer ()=default
virtual BasicBlock * createVectorizedLoopSkeleton ()
Creates a basic block for the scalar preheader.
void fixVectorizedLoop (VPTransformState &State)
Fix the vectorized code, taking care of header phi's, and more.
void fixNonInductionPHIs (VPTransformState &State)
Fix the non-induction PHIs in Plan.
Value * getTripCount () const
Returns the original loop trip count.
void setTripCount (Value *TC)
Used to set the trip count after ILV's construction and after the preheader block has been executed.
Protected Member Functions
BasicBlock * createScalarPreheader (StringRef Prefix)
Create and return a new IR basic block for the scalar preheader whose name is prefixed with Prefix.
virtual void printDebugTracesAtStart ()
Allow subclasses to override and print debug traces before/after vplan execution, when trace information is requested.
virtual void printDebugTracesAtEnd ()
Protected Attributes
Loop * OrigLoop
The original loop.
PredicatedScalarEvolution & PSE
A wrapper around ScalarEvolution used to add runtime SCEV checks.
LoopInfo * LI
Loop Info.
DominatorTree * DT
Dominator Tree.
const TargetTransformInfo * TTI
Target Transform Info.
AssumptionCache * AC
Assumption Cache.
ElementCount VF
The vectorization SIMD factor to use.
unsigned UF
The vectorization unroll factor to use.
IRBuilder Builder
The builder that we use.
Value * TripCount = nullptr
Trip count of the original loop.
LoopVectorizationCostModel * Cost
The profitablity analysis.
GeneratedRTChecks & RTChecks
Structure to hold information about generated runtime checks, responsible for cleaning the checks, if vectorization turns out unprofitable.
VPlan & Plan
VPBasicBlock * VectorPHVPBB
The vector preheader block of Plan, used as target for check blocks introduced during skeleton creation.
Friends
class LoopVectorizationPlanner

InnerLoopVectorizer vectorizes loops which contain only one basic block to a specified vectorization factor (VF).

This class performs the widening of scalars into vectors, or multiple scalars. This class also implements the following features:

Definition at line 499 of file LoopVectorize.cpp.

llvm::InnerLoopVectorizer::InnerLoopVectorizer ( Loop * OrigLoop, PredicatedScalarEvolution & PSE, LoopInfo * LI, DominatorTree * DT, const TargetTransformInfo * TTI, AssumptionCache * AC, ElementCount VecWidth, unsigned UnrollFactor, LoopVectorizationCostModel * CM, GeneratedRTChecks & RTChecks, VPlan & Plan ) inline

Definition at line 501 of file LoopVectorize.cpp.

References AC, Builder, llvm::cast(), Cost, DT, LI, OrigLoop, Plan, PSE, RTChecks, TTI, UF, VectorPHVPBB, and VF.

Referenced by llvm::InnerLoopAndEpilogueVectorizer::InnerLoopAndEpilogueVectorizer().

~InnerLoopVectorizer()

virtual llvm::InnerLoopVectorizer::~InnerLoopVectorizer ( ) virtualdefault

createScalarPreheader()

createVectorizedLoopSkeleton()

BasicBlock * InnerLoopVectorizer::createVectorizedLoopSkeleton ( ) virtual

fixNonInductionPHIs()

fixVectorizedLoop()

getTripCount()

Value * llvm::InnerLoopVectorizer::getTripCount ( ) const inline

printDebugTracesAtEnd()

virtual void llvm::InnerLoopVectorizer::printDebugTracesAtEnd ( ) inlineprotectedvirtual

printDebugTracesAtStart()

virtual void llvm::InnerLoopVectorizer::printDebugTracesAtStart ( ) inlineprotectedvirtual

setTripCount()

void llvm::InnerLoopVectorizer::setTripCount ( Value * TC) inline

LoopVectorizationPlanner

AC

Builder

Cost

DT

LI

OrigLoop

Loop* llvm::InnerLoopVectorizer::OrigLoop protected

Plan

VPlan& llvm::InnerLoopVectorizer::Plan protected

PSE

RTChecks

GeneratedRTChecks& llvm::InnerLoopVectorizer::RTChecks protected

TripCount

Value* llvm::InnerLoopVectorizer::TripCount = nullptr protected

TTI

UF

VectorPHVPBB

VF


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