class InnerLoopUnroller
Declaration
class InnerLoopUnroller : public InnerLoopVectorizer { /* full declaration omitted */ };
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.
Declared at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:735
Inherits from: InnerLoopVectorizer
Member Variables
Inherited from InnerLoopVectorizer:
- protected OrigLoop
- protected PSE
- protected LI
- protected DT
- protected AA
- protected TLI
- protected TTI
- protected AC
- protected ORE
- protected VF
- protected MinProfitableTripCount
- protected UF
- protected Builder
- protected LoopVectorPreHeader
- protected LoopScalarPreHeader
- protected LoopMiddleBlock
- protected LoopExitBlock
- protected LoopScalarBody
- protected LoopBypassBlocks
- protected PredicatedInstructions
- protected TripCount = nullptr
- protected VectorTripCount = nullptr
- protected Legal
- protected Cost
- protected AddedSafetyChecks = false
- protected IVEndValues
- protected BFI
- protected PSI
- protected OptForSizeBasedOnProfile
- protected RTChecks
- protected ReductionResumeValues
Method Overview
- public InnerLoopUnroller(llvm::Loop * OrigLoop, llvm::PredicatedScalarEvolution & PSE, llvm::LoopInfo * LI, llvm::DominatorTree * DT, const llvm::TargetLibraryInfo * TLI, const llvm::TargetTransformInfo * TTI, llvm::AssumptionCache * AC, llvm::OptimizationRemarkEmitter * ORE, unsigned int UnrollFactor, llvm::LoopVectorizationLegality * LVL, llvm::LoopVectorizationCostModel * CM, llvm::BlockFrequencyInfo * BFI, llvm::ProfileSummaryInfo * PSI, GeneratedRTChecks & Check)
- private llvm::Value * getBroadcastInstrs(llvm::Value * V)
Inherited from InnerLoopVectorizer:
- public areSafetyChecksAdded
- protected clearReductionWrapFlags
- protected collectPoisonGeneratingRecipes
- protected completeLoopSkeleton
- protected createBitOrPointerCast
- protected createInductionResumeValues
- protected createVectorLoopSkeleton
- public createVectorizedLoopSkeleton
- protected emitIterationCountCheck
- protected emitMemRuntimeChecks
- protected emitSCEVChecks
- protected fixCrossIterationPHIs
- protected fixFirstOrderRecurrence
- public fixNonInductionPHIs
- protected fixReduction
- public fixVectorizedLoop
- protected fixupIVUsers
- public getBroadcastInstrs
- protected getOrCreateTripCount
- protected getOrCreateVectorTripCount
- public getReductionResumeValue
- public packScalarIntoVectorValue
- protected printDebugTracesAtEnd
- protected printDebugTracesAtStart
- public scalarizeInstruction
- protected sinkScalarOperands
- protected truncateToMinimalBitwidths
- public useOrderedReductions
- public vectorizeInterleaveGroup
- public widenCallInstruction
Methods
¶InnerLoopUnroller(
llvm::Loop* OrigLoop,
llvm::PredicatedScalarEvolution& PSE,
llvm::LoopInfo* LI,
llvm::DominatorTree* DT,
const llvm::TargetLibraryInfo* TLI,
const llvm::TargetTransformInfo* TTI,
llvm::AssumptionCache* AC,
llvm::OptimizationRemarkEmitter* ORE,
unsigned int UnrollFactor,
llvm::LoopVectorizationLegality* LVL,
llvm::LoopVectorizationCostModel* CM,
llvm::BlockFrequencyInfo* BFI,
llvm::ProfileSummaryInfo* PSI,
GeneratedRTChecks& Check)
InnerLoopUnroller(
llvm::Loop* OrigLoop,
llvm::PredicatedScalarEvolution& PSE,
llvm::LoopInfo* LI,
llvm::DominatorTree* DT,
const llvm::TargetLibraryInfo* TLI,
const llvm::TargetTransformInfo* TTI,
llvm::AssumptionCache* AC,
llvm::OptimizationRemarkEmitter* ORE,
unsigned int UnrollFactor,
llvm::LoopVectorizationLegality* LVL,
llvm::LoopVectorizationCostModel* CM,
llvm::BlockFrequencyInfo* BFI,
llvm::ProfileSummaryInfo* PSI,
GeneratedRTChecks& Check)
Declared at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:737
Parameters
- llvm::Loop* OrigLoop
- llvm::PredicatedScalarEvolution& PSE
- llvm::LoopInfo* LI
- llvm::DominatorTree* DT
- const llvm::TargetLibraryInfo* TLI
- const llvm::TargetTransformInfo* TTI
- llvm::AssumptionCache* AC
- llvm::OptimizationRemarkEmitter* ORE
- unsigned int UnrollFactor
- llvm::LoopVectorizationLegality* LVL
- llvm::LoopVectorizationCostModel* CM
- llvm::BlockFrequencyInfo* BFI
- llvm::ProfileSummaryInfo* PSI
- GeneratedRTChecks& Check
¶llvm::Value* getBroadcastInstrs(llvm::Value* V)
llvm::Value* getBroadcastInstrs(llvm::Value* V)
Description
Create a broadcast instruction. 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.
Declared at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:751
Parameters
- llvm::Value* V