LLVM  7.0.0svn
llvm::InnerLoopVectorizer Class Reference

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

Inheritance diagram for llvm::InnerLoopVectorizer:
[legend]
Collaboration diagram for llvm::InnerLoopVectorizer:
[legend]

## Public Types

using VectorParts = SmallVector< Value *, 2 >
A type for vectorized values in the new loop. More...

## Public Member Functions

InnerLoopVectorizer (Loop *OrigLoop, PredicatedScalarEvolution &PSE, LoopInfo *LI, DominatorTree *DT, const TargetLibraryInfo *TLI, const TargetTransformInfo *TTI, AssumptionCache *AC, OptimizationRemarkEmitter *ORE, unsigned VecWidth, unsigned UnrollFactor, LoopVectorizationLegality *LVL, LoopVectorizationCostModel *CM)

virtual ~InnerLoopVectorizer ()=default

BasicBlockcreateVectorizedLoopSkeleton ()
Create a new empty loop. More...

void widenInstruction (Instruction &I)
Widen a single instruction within the innermost loop. More...

void fixVectorizedLoop ()
Fix the vectorized code, taking care of header phi's, live-outs, and more. More...

void widenPHIInstruction (Instruction *PN, unsigned UF, unsigned VF)
Vectorize a single PHINode in a block. More...

void scalarizeInstruction (Instruction *Instr, const VPIteration &Instance, bool IfPredicateInstr)
A helper function to scalarize a single Instruction in the innermost loop. More...

void widenIntOrFpInduction (PHINode *IV, TruncInst *Trunc=nullptr)
Widen an integer or floating-point induction variable IV. More...

ValuegetOrCreateVectorValue (Value *V, unsigned Part)
getOrCreateVectorValue and getOrCreateScalarValue coordinate to generate a vector or scalar value on-demand if one is not yet available. More...

ValuegetOrCreateScalarValue (Value *V, const VPIteration &Instance)
Return a value in the new loop corresponding to V from the original loop at unroll and vector indices Instance. More...

void packScalarIntoVectorValue (Value *V, const VPIteration &Instance)
Construct the vector value of a scalarized value V one lane at a time. More...

void vectorizeInterleaveGroup (Instruction *Instr)
Try to vectorize the interleaved access group that Instr belongs to. More...

void vectorizeMemoryInstruction (Instruction *Instr, VectorParts *BlockInMask=nullptr)
Vectorize Load and Store instructions, optionally masking the vector operations if BlockInMask is non-null. More...

void setDebugLocFromInst (IRBuilder<> &B, const Value *Ptr)
Set the debug location in the builder using the debug location in the instruction. More...

## Protected Types

using PhiVector = SmallVector< PHINode *, 4 >
A small list of PHINodes. More...

using ScalarParts = SmallVector< SmallVector< Value *, 4 >, 2 >
A type for scalarized values in the new loop. More...

## Protected Member Functions

void fixupIVUsers (PHINode *OrigPhi, const InductionDescriptor &II, Value *CountRoundDown, Value *EndValue, BasicBlock *MiddleBlock)
Set up the values of the IVs correctly when exiting the vector loop. More...

PHINodecreateInductionVariable (Loop *L, Value *Start, Value *End, Value *Step, Instruction *DL)
Create a new induction variable inside L. More...

void fixCrossIterationPHIs ()
Handle all cross-iteration phis in the header. More...

void fixFirstOrderRecurrence (PHINode *Phi)
Fix a first-order recurrence. More...

void fixReduction (PHINode *Phi)
Fix a reduction cross-iteration phi. More...

void fixLCSSAPHIs ()
The Loop exit block may have single value PHI nodes with some incoming value. More...

void sinkScalarOperands (Instruction *PredInst)
Iteratively sink the scalarized operands of a predicated instruction into the block that was created for it. More...

void truncateToMinimalBitwidths ()
Shrinks vector element sizes to the smallest bitwidth they can be legally represented as. More...

void updateAnalysis ()
Insert the new loop to the loop hierarchy and pass manager and update the analysis passes. More...

virtual ValuegetStepVector (Value *Val, int StartIdx, Value *Step, Instruction::BinaryOps Opcode=Instruction::BinaryOpsEnd)
This function adds (StartIdx, StartIdx + Step, StartIdx + 2*Step, ...) to each vector element of Val. More...

void buildScalarSteps (Value *ScalarIV, Value *Step, Instruction *EntryVal, const InductionDescriptor &ID)
Compute scalar induction steps. More...

void createVectorIntOrFpInductionPHI (const InductionDescriptor &II, Value *Step, Instruction *EntryVal)
Create a vector induction phi node based on an existing scalar one. More...

bool shouldScalarizeInstruction (Instruction *I) const
Returns true if an instruction I should be scalarized instead of vectorized for the chosen vectorization factor. More...

bool needsScalarInduction (Instruction *IV) const
Returns true if we should generate a scalar version of IV. More...

void recordVectorLoopValueForInductionCast (const InductionDescriptor &ID, const Instruction *EntryVal, Value *VectorLoopValue, unsigned Part, unsigned Lane=UINT_MAX)
If there is a cast involved in the induction variable ID, which should be ignored in the vectorized loop body, this function records the VectorLoopValue of the respective Phi also as the VectorLoopValue of the cast. More...

virtual ValuereverseVector (Value *Vec)
Generate a shuffle sequence that will reverse the vector Vec. More...

ValuegetOrCreateTripCount (Loop *NewLoop)
Returns (and creates if needed) the original loop trip count. More...

ValuegetOrCreateVectorTripCount (Loop *NewLoop)
Returns (and creates if needed) the trip count of the widened loop. More...

ValuecreateBitOrPointerCast (Value *V, VectorType *DstVTy, const DataLayout &DL)
Returns a bitcasted value to the requested vector type. More...

void emitMinimumIterationCountCheck (Loop *L, BasicBlock *Bypass)
Emit a bypass check to see if the vector trip count is zero, including if it overflows. More...

void emitSCEVChecks (Loop *L, BasicBlock *Bypass)
Emit a bypass check to see if all of the SCEV assumptions we've had to make are correct. More...

void emitMemRuntimeChecks (Loop *L, BasicBlock *Bypass)
Emit bypass checks to check any memory assumptions we may have made. More...

Add additional metadata to To that was not present on Orig. More...

Similar to the previous function but it adds the metadata to a vector of instructions. More...

## Protected Attributes

LoopOrigLoop
The original loop. More...

PredicatedScalarEvolutionPSE
A wrapper around ScalarEvolution used to add runtime SCEV checks. More...

LoopInfoLI
Loop Info. More...

DominatorTreeDT
Dominator Tree. More...

AliasAnalysisAA
Alias Analysis. More...

const TargetLibraryInfoTLI
Target Library Info. More...

const TargetTransformInfoTTI
Target Transform Info. More...

AssumptionCacheAC
Assumption Cache. More...

OptimizationRemarkEmitterORE
Interface to emit optimization remarks. More...

std::unique_ptr< LoopVersioningLVer
LoopVersioning. More...

unsigned VF
The vectorization SIMD factor to use. More...

unsigned UF
The vectorization unroll factor to use. More...

IRBuilder Builder
The builder that we use. More...

BasicBlockLoopMiddleBlock
Middle Block between the vector and the scalar. More...

BasicBlockLoopExitBlock
The ExitBlock of the scalar loop. More...

BasicBlockLoopVectorBody
The vector loop body. More...

BasicBlockLoopScalarBody
The scalar loop body. More...

SmallVector< BasicBlock *, 4 > LoopBypassBlocks
A list of all bypass blocks. The first block is the entry of the loop. More...

PHINodeInduction = nullptr
The new Induction variable which was added to the new block. More...

PHINodeOldInduction = nullptr
The induction variable of the old basic block. More...

VectorizerValueMap VectorLoopValueMap
Maps values from the original loop to their corresponding values in the vectorized loop. More...

SmallVector< Instruction *, 4 > PredicatedInstructions
Store instructions that were predicated. More...

ValueTripCount = nullptr
Trip count of the original loop. More...

ValueVectorTripCount = nullptr
Trip count of the widened loop (TripCount - TripCount % (VF*UF)) More...

LoopVectorizationLegalityLegal
The legality analysis. More...

LoopVectorizationCostModelCost
The profitablity analysis. More...

DenseMap< PHINode *, Value * > IVEndValues

## Friends

class LoopVectorizationPlanner

## Detailed Description

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:

• It inserts an epilogue loop for handling loops that don't have iteration counts that are known to be a multiple of the vectorization factor.
• It handles the code generation for reduction variables.
• Scalarization (implementation using scalars) of un-vectorizable instructions. InnerLoopVectorizer does not perform any vectorization-legality checks, and relies on the caller to check for the different legality aspects. The InnerLoopVectorizer relies on the LoopVectorizationLegality class to provide information about the induction and reduction variables that were found to a given vectorization factor.

Definition at line 357 of file LoopVectorize.cpp.

## ◆ PhiVector

 using llvm::InnerLoopVectorizer::PhiVector = SmallVector
protected

A small list of PHINodes.

Definition at line 455 of file LoopVectorize.cpp.

## ◆ ScalarParts

 using llvm::InnerLoopVectorizer::ScalarParts = SmallVector, 2>
protected

A type for scalarized values in the new loop.

Each value from the original loop, when scalarized, is represented by UF x VF scalar values in the new unrolled loop, where UF is the unroll factor and VF is the vectorization factor.

Definition at line 461 of file LoopVectorize.cpp.

## ◆ VectorParts

 using llvm::InnerLoopVectorizer::VectorParts = SmallVector

A type for vectorized values in the new loop.

Each value from the original loop, when vectorized, is represented by UF vector values in the new unrolled loop, where UF is the unroll factor.

Definition at line 388 of file LoopVectorize.cpp.

## ◆ InnerLoopVectorizer()

 llvm::InnerLoopVectorizer::InnerLoopVectorizer ( Loop * OrigLoop, PredicatedScalarEvolution & PSE, LoopInfo * LI, DominatorTree * DT, const TargetLibraryInfo * TLI, const TargetTransformInfo * TTI, AssumptionCache * AC, OptimizationRemarkEmitter * ORE, unsigned VecWidth, unsigned UnrollFactor, LoopVectorizationLegality * LVL, LoopVectorizationCostModel * CM )
inline

Definition at line 359 of file LoopVectorize.cpp.

## ◆ ~InnerLoopVectorizer()

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

Referenced by InnerLoopVectorizer().

## Member Function Documentation

protected

This includes both the original MDs from From and additional ones (

Definition at line 788 of file LoopVectorize.cpp.

protected

Similar to the previous function but it adds the metadata to a vector of instructions.

Definition at line 794 of file LoopVectorize.cpp.

protected

Add additional metadata to To that was not present on Orig.

Currently this is used to add the noalias annotations based on the inserted memchecks. Use this for instructions that are cloned into the vector loop.

Definition at line 780 of file LoopVectorize.cpp.

References LVer.

inline

Definition at line 383 of file LoopVectorize.cpp.

Referenced by llvm::LoopVectorizePass::processLoop().

## ◆ buildScalarSteps()

 void InnerLoopVectorizer::buildScalarSteps ( Value * ScalarIV, Value * Step, Instruction * EntryVal, const InductionDescriptor & ID )
protected

Compute scalar induction steps.

ScalarIV is the scalar induction variable on which to base the steps, Step is the size of the step, and EntryVal is the value from the original loop that maps to the steps. Note that EntryVal doesn't have to be an induction variable - it can also be a truncate instruction.

Definition at line 2044 of file LoopVectorize.cpp.

Referenced by widenIntOrFpInduction().

## ◆ createBitOrPointerCast()

 Value * InnerLoopVectorizer::createBitOrPointerCast ( Value * V, VectorType * DstVTy, const DataLayout & DL )
protected

Returns a bitcasted value to the requested vector type.

Also handles bitcasts of vector<float> <-> vector<pointer> types.

Definition at line 2668 of file LoopVectorize.cpp.

Referenced by vectorizeInterleaveGroup().

## ◆ createInductionVariable()

 PHINode * InnerLoopVectorizer::createInductionVariable ( Loop * L, Value * Start, Value * End, Value * Step, Instruction * DL )
protected

## ◆ createVectorIntOrFpInductionPHI()

 void InnerLoopVectorizer::createVectorIntOrFpInductionPHI ( const InductionDescriptor & II, Value * Step, Instruction * EntryVal )
protected

Create a vector induction phi node based on an existing scalar one.

EntryVal is the value from the original loop that maps to the vector phi node, and Step is the loop-invariant step. If EntryVal is a truncate instruction, instead of widening the original IV, we widen a version of the IV truncated to EntryVal's type.

Definition at line 1773 of file LoopVectorize.cpp.

Referenced by widenIntOrFpInduction().

## ◆ emitMemRuntimeChecks()

 void InnerLoopVectorizer::emitMemRuntimeChecks ( Loop * L, BasicBlock * Bypass )
protected

Emit bypass checks to check any memory assumptions we may have made.

Definition at line 2756 of file LoopVectorize.cpp.

Referenced by createVectorizedLoopSkeleton().

## ◆ emitMinimumIterationCountCheck()

 void InnerLoopVectorizer::emitMinimumIterationCountCheck ( Loop * L, BasicBlock * Bypass )
protected

Emit a bypass check to see if the vector trip count is zero, including if it overflows.

Definition at line 2698 of file LoopVectorize.cpp.

Referenced by createVectorizedLoopSkeleton().

## ◆ emitSCEVChecks()

 void InnerLoopVectorizer::emitSCEVChecks ( Loop * L, BasicBlock * Bypass )
protected

Emit a bypass check to see if all of the SCEV assumptions we've had to make are correct.

Definition at line 2726 of file LoopVectorize.cpp.

Referenced by createVectorizedLoopSkeleton().

## ◆ fixCrossIterationPHIs()

 void InnerLoopVectorizer::fixCrossIterationPHIs ( )
protected

Handle all cross-iteration phis in the header.

Definition at line 3358 of file LoopVectorize.cpp.

Referenced by fixVectorizedLoop().

## ◆ fixFirstOrderRecurrence()

 void InnerLoopVectorizer::fixFirstOrderRecurrence ( PHINode * Phi )
protected

## ◆ fixLCSSAPHIs()

 void InnerLoopVectorizer::fixLCSSAPHIs ( )
protected

The Loop exit block may have single value PHI nodes with some incoming value.

While vectorizing we only handled real values that were defined inside the loop and we should have one value for each predecessor of its parent basic block. See PR14725.

Definition at line 3715 of file LoopVectorize.cpp.

Referenced by fixVectorizedLoop().

## ◆ fixupIVUsers()

 void InnerLoopVectorizer::fixupIVUsers ( PHINode * OrigPhi, const InductionDescriptor & II, Value * CountRoundDown, Value * EndValue, BasicBlock * MiddleBlock )
protected

## ◆ fixVectorizedLoop()

 void InnerLoopVectorizer::fixVectorizedLoop ( )

Fix the vectorized code, taking care of header phi's, live-outs, and more.

Definition at line 3322 of file LoopVectorize.cpp.

Referenced by llvm::LoopVectorizationPlanner::executePlan(), and InnerLoopVectorizer().

 Value * InnerLoopVectorizer::getBroadcastInstrs ( Value * V )
protectedvirtual

This method generates a broadcast instruction (shuffle) for loop invariant values and for the induction value. If this is the induction variable then we extend it to N, N+1, ... this is needed because each iteration in the loop corresponds to a SIMD element.

Definition at line 1754 of file LoopVectorize.cpp.

## ◆ getOrCreateScalarValue()

 Value * InnerLoopVectorizer::getOrCreateScalarValue ( Value * V, const VPIteration & Instance )

Return a value in the new loop corresponding to V from the original loop at unroll and vector indices Instance.

If the value has been vectorized but not scalarized, the necessary extractelement instruction will be generated.

Definition at line 2158 of file LoopVectorize.cpp.

## ◆ getOrCreateTripCount()

 Value * InnerLoopVectorizer::getOrCreateTripCount ( Loop * NewLoop )
protected

Returns (and creates if needed) the original loop trip count.

Definition at line 2591 of file LoopVectorize.cpp.

## ◆ getOrCreateVectorTripCount()

 Value * InnerLoopVectorizer::getOrCreateVectorTripCount ( Loop * NewLoop )
protected

Returns (and creates if needed) the trip count of the widened loop.

Definition at line 2636 of file LoopVectorize.cpp.

Referenced by createVectorizedLoopSkeleton(), and fixVectorizedLoop().

## ◆ getOrCreateVectorValue()

 Value * InnerLoopVectorizer::getOrCreateVectorValue ( Value * V, unsigned Part )

getOrCreateVectorValue and getOrCreateScalarValue coordinate to generate a vector or scalar value on-demand if one is not yet available.

When vectorizing a loop, we visit the definition of an instruction before its uses. When visiting the definition, we either vectorize or scalarize the instruction, creating an entry for it in the corresponding map. (In some cases, such as induction variables, we will create both vector and scalar entries.) Then, as we encounter uses of the definition, we derive values for each scalar or vector use unless such a value is already available. For example, if we scalarize a definition and one of its uses is vector, we build the required vector on-demand with an insertelement sequence when visiting the use. Otherwise, if the use is scalar, we can use the existing scalar definition.

Return a value in the new loop corresponding to V from the original loop at unroll index Part. If the value has already been vectorized, the corresponding vector entry in VectorLoopValueMap is returned. If, however, the value has a scalar entry in VectorLoopValueMap, we construct a new vector value on-demand by inserting the scalar values into a vector with an insertelement sequence. If the value has been neither vectorized nor scalarized, it must be loop invariant, so we simply broadcast the value into a vector.

Definition at line 2085 of file LoopVectorize.cpp.

## ◆ getStepVector()

 Value * InnerLoopVectorizer::getStepVector ( Value * Val, int StartIdx, Value * Step, Instruction::BinaryOps Opcode = Instruction::BinaryOpsEnd )
protectedvirtual

This function adds (StartIdx, StartIdx + Step, StartIdx + 2*Step, ...) to each vector element of Val.

The sequence starts at StartIndex. Opcode is relevant for FP induction variable.

Definition at line 1988 of file LoopVectorize.cpp.

## ◆ needsScalarInduction()

 bool InnerLoopVectorizer::needsScalarInduction ( Instruction * IV ) const
protected

Returns true if we should generate a scalar version of IV.

Definition at line 1853 of file LoopVectorize.cpp.

Referenced by widenIntOrFpInduction().

## ◆ packScalarIntoVectorValue()

 void InnerLoopVectorizer::packScalarIntoVectorValue ( Value * V, const VPIteration & Instance )

Construct the vector value of a scalarized value V one lane at a time.

Definition at line 2191 of file LoopVectorize.cpp.

Referenced by llvm::VPReplicateRecipe::execute(), and getOrCreateVectorValue().

## ◆ recordVectorLoopValueForInductionCast()

 void InnerLoopVectorizer::recordVectorLoopValueForInductionCast ( const InductionDescriptor & ID, const Instruction * EntryVal, Value * VectorLoopValue, unsigned Part, unsigned Lane = UINT_MAX )
protected

If there is a cast involved in the induction variable ID, which should be ignored in the vectorized loop body, this function records the VectorLoopValue of the respective Phi also as the VectorLoopValue of the cast.

We had already proved that the casted Phi is equal to the uncasted Phi in the vectorized loop (under a runtime guard), and therefore there is no need to vectorize the cast - the same value can be used in the vector loop for both the Phi and the cast. If VectorLoopValue is a scalarized value, Lane is also specified, Otherwise, VectorLoopValue is a widened/vectorized value.

EntryVal is the value from the original loop that maps to the vector phi node and is used to distinguish what is the IV currently being processed - original one (if EntryVal is a phi corresponding to the original IV) or the "newly-created" one based on the proof mentioned above (see also buildScalarSteps() and createVectorIntOrFPInductionPHI()). In the latter case EntryVal is a TruncInst and we must not record anything for that IV, but it's error-prone to expect callers of this routine to care about that, hence this explicit parameter.

Definition at line 1863 of file LoopVectorize.cpp.

Referenced by buildScalarSteps(), createVectorIntOrFpInductionPHI(), and widenIntOrFpInduction().

## ◆ reverseVector()

 Value * InnerLoopVectorizer::reverseVector ( Value * Vec )
protectedvirtual

Generate a shuffle sequence that will reverse the vector Vec.

Definition at line 2204 of file LoopVectorize.cpp.

## ◆ scalarizeInstruction()

 void InnerLoopVectorizer::scalarizeInstruction ( Instruction * Instr, const VPIteration & Instance, bool IfPredicateInstr )

A helper function to scalarize a single Instruction in the innermost loop.

Generates a sequence of scalar instances for each lane between MinLane and MaxLane, times each part between MinPart and MaxPart, inclusive..

Definition at line 2521 of file LoopVectorize.cpp.

Referenced by llvm::VPReplicateRecipe::execute().

## ◆ setDebugLocFromInst()

 void InnerLoopVectorizer::setDebugLocFromInst ( IRBuilder<> & B, const Value * Ptr )

Set the debug location in the builder using the debug location in the instruction.

Definition at line 751 of file LoopVectorize.cpp.

## ◆ shouldScalarizeInstruction()

 bool InnerLoopVectorizer::shouldScalarizeInstruction ( Instruction * I ) const
protected

Returns true if an instruction I should be scalarized instead of vectorized for the chosen vectorization factor.

Definition at line 1848 of file LoopVectorize.cpp.

Referenced by needsScalarInduction(), and widenIntOrFpInduction().

## ◆ sinkScalarOperands()

 void InnerLoopVectorizer::sinkScalarOperands ( Instruction * PredInst )
protected

Iteratively sink the scalarized operands of a predicated instruction into the block that was created for it.

Definition at line 3725 of file LoopVectorize.cpp.

Referenced by fixVectorizedLoop().

## ◆ truncateToMinimalBitwidths()

 void InnerLoopVectorizer::truncateToMinimalBitwidths ( )
protected

## ◆ updateAnalysis()

 void InnerLoopVectorizer::updateAnalysis ( )
protected

## ◆ vectorizeInterleaveGroup()

 void InnerLoopVectorizer::vectorizeInterleaveGroup ( Instruction * Instr )

## ◆ vectorizeMemoryInstruction()

 void InnerLoopVectorizer::vectorizeMemoryInstruction ( Instruction * Instr, VectorParts * BlockInMask = nullptr )

## ◆ widenIntOrFpInduction()

 void InnerLoopVectorizer::widenIntOrFpInduction ( PHINode * IV, TruncInst * Trunc = nullptr )

Widen an integer or floating-point induction variable IV.

If Trunc is provided, the integer induction variable will first be truncated to the corresponding type.

Definition at line 1891 of file LoopVectorize.cpp.

Referenced by llvm::VPWidenIntOrFpInductionRecipe::execute().

## ◆ widenPHIInstruction()

 void InnerLoopVectorizer::widenPHIInstruction ( Instruction * PN, unsigned UF, unsigned VF )

Vectorize a single PHINode in a block.

This method handles the induction variable canonicalization. It supports both VF = 1 for unrolled loops and arbitrary length vectors.

Definition at line 3789 of file LoopVectorize.cpp.

Referenced by llvm::VPWidenPHIRecipe::execute().

## ◆ LoopVectorizationPlanner

 friend class LoopVectorizationPlanner
friend

Definition at line 452 of file LoopVectorize.cpp.

## ◆ AA

 AliasAnalysis* llvm::InnerLoopVectorizer::AA
protected

Alias Analysis.

Definition at line 620 of file LoopVectorize.cpp.

## ◆ AC

 AssumptionCache* llvm::InnerLoopVectorizer::AC
protected

Assumption Cache.

Definition at line 629 of file LoopVectorize.cpp.

protected

Definition at line 703 of file LoopVectorize.cpp.

Referenced by areSafetyChecksAdded(), emitMemRuntimeChecks(), and emitSCEVChecks().

## ◆ Builder

 IRBuilder llvm::InnerLoopVectorizer::Builder
protected

## ◆ Cost

 LoopVectorizationCostModel* llvm::InnerLoopVectorizer::Cost
protected

## ◆ DT

 DominatorTree* llvm::InnerLoopVectorizer::DT
protected

Dominator Tree.

Definition at line 617 of file LoopVectorize.cpp.

## ◆ Induction

 PHINode* llvm::InnerLoopVectorizer::Induction = nullptr
protected

The new Induction variable which was added to the new block.

Definition at line 676 of file LoopVectorize.cpp.

## ◆ IVEndValues

 DenseMap llvm::InnerLoopVectorizer::IVEndValues
protected

Definition at line 707 of file LoopVectorize.cpp.

Referenced by createVectorizedLoopSkeleton(), and fixVectorizedLoop().

## ◆ LoopBypassBlocks

 SmallVector llvm::InnerLoopVectorizer::LoopBypassBlocks
protected

A list of all bypass blocks. The first block is the entry of the loop.

Definition at line 673 of file LoopVectorize.cpp.

## ◆ LoopExitBlock

 BasicBlock* llvm::InnerLoopVectorizer::LoopExitBlock
protected

The ExitBlock of the scalar loop.

Definition at line 664 of file LoopVectorize.cpp.

## ◆ LoopMiddleBlock

 BasicBlock* llvm::InnerLoopVectorizer::LoopMiddleBlock
protected

Middle Block between the vector and the scalar.

Definition at line 661 of file LoopVectorize.cpp.

## ◆ LoopScalarBody

 BasicBlock* llvm::InnerLoopVectorizer::LoopScalarBody
protected

The scalar loop body.

Definition at line 670 of file LoopVectorize.cpp.

Referenced by createVectorizedLoopSkeleton(), and updateAnalysis().

protected

Definition at line 658 of file LoopVectorize.cpp.

## ◆ LoopVectorBody

 BasicBlock* llvm::InnerLoopVectorizer::LoopVectorBody
protected

The vector loop body.

Definition at line 667 of file LoopVectorize.cpp.

protected

Definition at line 655 of file LoopVectorize.cpp.

## ◆ LVer

 std::unique_ptr llvm::InnerLoopVectorizer::LVer
protected

It's only set up (non-null) if memchecks were used.

This is currently only used to add no-alias metadata based on the memchecks. The actually versioning is performed manually.

Definition at line 639 of file LoopVectorize.cpp.

## ◆ OldInduction

 PHINode* llvm::InnerLoopVectorizer::OldInduction = nullptr
protected

The induction variable of the old basic block.

Definition at line 679 of file LoopVectorize.cpp.

Referenced by createInductionVariable(), createVectorizedLoopSkeleton(), and widenIntOrFpInduction().

## ◆ ORE

 OptimizationRemarkEmitter* llvm::InnerLoopVectorizer::ORE
protected

Interface to emit optimization remarks.

Definition at line 632 of file LoopVectorize.cpp.

## ◆ OrigLoop

 Loop* llvm::InnerLoopVectorizer::OrigLoop
protected

## ◆ PredicatedInstructions

 SmallVector llvm::InnerLoopVectorizer::PredicatedInstructions
protected

Store instructions that were predicated.

Definition at line 688 of file LoopVectorize.cpp.

Referenced by fixVectorizedLoop(), and scalarizeInstruction().

## ◆ PSE

 PredicatedScalarEvolution& llvm::InnerLoopVectorizer::PSE
protected

A wrapper around ScalarEvolution used to add runtime SCEV checks.

Applies dynamic knowledge to simplify SCEV expressions and converts them to a more usable form.

Definition at line 611 of file LoopVectorize.cpp.

## ◆ TLI

 const TargetLibraryInfo* llvm::InnerLoopVectorizer::TLI
protected

## ◆ TripCount

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

Trip count of the original loop.

Definition at line 691 of file LoopVectorize.cpp.

Referenced by getOrCreateTripCount().

## ◆ UF

 unsigned llvm::InnerLoopVectorizer::UF
protected

The vectorization unroll factor to use.

Each scalar is vectorized to this many different vector instructions.

Definition at line 647 of file LoopVectorize.cpp.

## ◆ VectorLoopValueMap

 VectorizerValueMap llvm::InnerLoopVectorizer::VectorLoopValueMap
protected

Maps values from the original loop to their corresponding values in the vectorized loop.

A key value can map to either vector values, scalar values or both kinds of values, depending on whether the key was vectorized and scalarized.

Definition at line 685 of file LoopVectorize.cpp.

## ◆ VectorTripCount

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

Trip count of the widened loop (TripCount - TripCount % (VF*UF))

Definition at line 694 of file LoopVectorize.cpp.

Referenced by getOrCreateVectorTripCount().

## ◆ VF

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