|
LLVM 24.0.0git
|
VPlan-based builder utility analogous to IRBuilder. More...
#include "Transforms/Vectorize/LoopVectorizationPlanner.h"
Classes | |
| class | InsertPointGuard |
| RAII object that stores the current insertion point and restores it when the object is destroyed. More... | |
Static Public Member Functions | |
| static VPBuilder | getToInsertAfter (VPRecipeBase *R) |
Create a VPBuilder to insert after R. | |
| static VPSingleDefRecipe * | createSingleScalarOp (unsigned Opcode, ArrayRef< VPValue * > Operands, VPValue *Mask, const VPIRFlags &Flags, const VPIRMetadata &Metadata, DebugLoc DL, Instruction *UV) |
Create a single-scalar recipe with Opcode and Operands without inserting it. | |
VPlan-based builder utility analogous to IRBuilder.
Definition at line 99 of file LoopVectorizationPlanner.h.
|
default |
Referenced by getToInsertAfter(), and llvm::VPBuilder::InsertPointGuard::InsertPointGuard().
|
inline |
Definition at line 156 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 157 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 275 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
Referenced by handleUncountableExitsWithSideEffects(), and preparePlanForEpilogueVectorLoop().
|
inline |
Definition at line 258 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions().
| VPInstruction * VPBuilder::createAnyOfReduction | ( | VPValue * | ChainOp, |
| VPValue * | TrueVal, | ||
| VPValue * | FalseVal, | ||
| DebugLoc | DL = DebugLoc::getUnknown() ) |
Create an AnyOf reduction pattern: or-reduce ChainOp, freeze the result, then select between TrueVal and FalseVal.
Definition at line 1668 of file VPlan.cpp.
References assert(), llvm::VPInstruction::ComputeReductionResult, createNaryOp(), createSelect(), DL, llvm::VPValue::getScalarType(), llvm::Type::isIntegerTy(), and llvm::Or.
Referenced by llvm::VPlanTransforms::optimizeFindIVReductions().
| VPSingleDefRecipe * VPBuilder::createConsecutiveVectorPointer | ( | VPValue * | Ptr, |
| Type * | SourceElementTy, | ||
| bool | Reverse, | ||
| DebugLoc | DL ) |
Create a vector pointer recipe for a consecutive memory access to Ptr with element type SourceElementTy.
Definition at line 1696 of file VPlan.cpp.
References createVectorPointer(), DL, llvm::VPlan::getConstantInt(), llvm::VPlan::getDataLayout(), llvm::vputils::getGEPFlagsForPtr(), llvm::DataLayout::getIndexType(), getPlan(), llvm::VPValue::getScalarType(), llvm::VPlan::getVF(), llvm::VPlan::hasTailFolded(), llvm::GEPNoWrapFlags::none(), and llvm::Reverse.
|
inline |
Convert Current to Start + Current * Step.
Definition at line 390 of file LoopVectorizationPlanner.h.
Referenced by tryToComputeEndValueForInduction().
|
inline |
Definition at line 376 of file LoopVectorizationPlanner.h.
References createOverflowingOp(), createVScale(), llvm::VPlan::getConstantInt(), and getPlan().
|
inline |
Definition at line 498 of file LoopVectorizationPlanner.h.
Referenced by llvm::VPlanTransforms::addMinimumIterationCheck(), and llvm::VPlanTransforms::convertToStridedAccesses().
|
inline |
Create a new FCmp VPInstruction with predicate Pred and operands A and B.
Definition at line 324 of file LoopVectorizationPlanner.h.
References A(), assert(), B(), DL, llvm::CmpInst::FIRST_FCMP_PREDICATE, llvm::DebugLoc::getUnknown(), and llvm::CmpInst::LAST_FCMP_PREDICATE.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions().
|
inline |
Definition at line 222 of file LoopVectorizationPlanner.h.
References DL, llvm::VPInstruction::FirstActiveLane, llvm::VPlan::getContext(), llvm::VPlan::getDataLayout(), llvm::DataLayout::getIndexType(), getPlan(), and llvm::DebugLoc::getUnknown().
Referenced by llvm::VPlanTransforms::handleUncountableEarlyExits(), and handleUncountableExitsWithSideEffects().
|
inline |
Create a new ICmp VPInstruction with predicate Pred and operands A and B.
Definition at line 313 of file LoopVectorizationPlanner.h.
References A(), assert(), B(), DL, llvm::CmpInst::FIRST_ICMP_PREDICATE, llvm::DebugLoc::getUnknown(), and llvm::CmpInst::LAST_ICMP_PREDICATE.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions(), handleUncountableExitsWithSideEffects(), and llvm::VPlanTransforms::optimizeFindIVReductions().
|
inline |
Definition at line 233 of file LoopVectorizationPlanner.h.
References DL, llvm::VPlan::getContext(), llvm::VPlan::getDataLayout(), llvm::DataLayout::getIndexType(), getPlan(), llvm::DebugLoc::getUnknown(), and llvm::VPInstruction::LastActiveLane.
|
inline |
Definition at line 290 of file LoopVectorizationPlanner.h.
References createNaryOp(), DL, llvm::DebugLoc::getUnknown(), LHS, llvm::VPInstruction::LogicalAnd, and RHS.
Referenced by llvm::VPlanTransforms::optimizeFindIVReductions().
|
inline |
Definition at line 296 of file LoopVectorizationPlanner.h.
References createNaryOp(), DL, llvm::DebugLoc::getUnknown(), LHS, llvm::VPInstruction::LogicalOr, and RHS.
Referenced by llvm::VPlanTransforms::handleUncountableEarlyExits().
|
inline |
Definition at line 206 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), and Operands.
|
inline |
Definition at line 202 of file LoopVectorizationPlanner.h.
|
inline |
Create an N-ary operation with Opcode, Operands and set Inst as its underlying Instruction.
Definition at line 190 of file LoopVectorizationPlanner.h.
References Operands.
Referenced by addBypassBranch(), addInitialSkeleton(), llvm::VPlanTransforms::adjustFirstOrderRecurrenceMiddleUsers(), createAnyOfReduction(), createLogicalAnd(), createLogicalOr(), llvm::VPlanTransforms::expandBranchOnTwoConds(), llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExits(), handleUncountableExitsWithSideEffects(), llvm::VPlanTransforms::optimizeFindIVReductions(), preparePlanForMainVectorLoop(), and tryToSinkOrHoistRecurrenceUsers().
|
inline |
Definition at line 214 of file LoopVectorizationPlanner.h.
References Operands.
|
inline |
Definition at line 252 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), and llvm::VPInstruction::Not.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExits(), and llvm::VPlanTransforms::optimizeFindIVReductions().
|
inline |
Definition at line 346 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::Offset, and llvm::VPInstruction::PtrAdd.
Referenced by createPtrAdd().
|
inline |
Definition at line 265 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions(), and llvm::VPlanTransforms::optimizeFindIVReductions().
|
inline |
Definition at line 244 of file LoopVectorizationPlanner.h.
References Operands.
Referenced by createElementCount(), and llvm::VPRegionBlock::getOrCreateCanonicalIVIncrement().
|
inline |
Definition at line 340 of file LoopVectorizationPlanner.h.
References createNoWrapPtrAdd(), DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), and llvm::Offset.
|
inline |
Definition at line 413 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Definition at line 405 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createScalarSExtOrTrunc(), createScalarZExtOrTrunc(), and tryToComputeEndValueForInduction().
Definition at line 461 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Create a scalar call to the intrinsic IntrinsicID with Operands, and result type ResultTy.
Definition at line 423 of file LoopVectorizationPlanner.h.
References AbstractManglingParser< Derived, Alloc >::Ops, DL, llvm::VPlan::getConstantInt(), getPlan(), llvm::VPInstruction::Intrinsic, and Operands.
Referenced by createVScale().
|
inline |
Definition at line 490 of file LoopVectorizationPlanner.h.
References DL, llvm::FPMathOperator::getFastMathFlags(), and IV.
|
inline |
Definition at line 398 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Definition at line 362 of file LoopVectorizationPlanner.h.
References DL, and llvm::DebugLoc::getUnknown().
Referenced by addInitialSkeleton(), llvm::VPlanTransforms::convertToVariableLengthStep(), llvm::VPRegionBlock::dissolveToCFGLoop(), and preparePlanForMainVectorLoop().
|
inline |
Definition at line 450 of file LoopVectorizationPlanner.h.
References createScalarCast(), DL, and llvm::Type::getScalarSizeInBits().
|
inline |
Definition at line 439 of file LoopVectorizationPlanner.h.
References createScalarCast(), DL, and llvm::Type::getScalarSizeInBits().
Referenced by fixupVFUsersForEVL(), handleUncountableExitsWithSideEffects(), optimizeMaskToEVL(), and llvm::VPlanTransforms::simplifyKnownEVL().
|
inline |
Definition at line 302 of file LoopVectorizationPlanner.h.
References Cond, DL, and llvm::DebugLoc::getUnknown().
Referenced by createAnyOfReduction(), llvm::VPlanTransforms::handleMaxMinNumReductions(), and llvm::VPlanTransforms::optimizeFindIVReductions().
|
inlinestatic |
Create a single-scalar recipe with Opcode and Operands without inserting it.
Definition at line 474 of file LoopVectorizationPlanner.h.
References assert(), DL, llvm::Value::getName(), llvm::Value::getType(), llvm::Instruction::isCast(), and Operands.
Referenced by cloneForLane(), convertRecipesInRegionBlocksToSingleScalar(), llvm::VPRecipeBuilder::handleReplication(), legalizeAndOptimizeInductions(), llvm::VPlanTransforms::makeScalarizationDecisions(), narrowToSingleScalarRecipes(), and sinkScalarOperands().
|
inline |
Definition at line 283 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
|
inline |
Definition at line 503 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createConsecutiveVectorPointer().
|
inline |
Create a scalar llvm.vscale call.
Definition at line 434 of file LoopVectorizationPlanner.h.
References createScalarIntrinsic(), DL, and llvm::DebugLoc::getUnknown().
Referenced by createElementCount().
|
inline |
Definition at line 466 of file LoopVectorizationPlanner.h.
References llvm::VPIRFlags::getDefaultFlags().
Referenced by llvm::VPlanTransforms::truncateToMinimalBitwidths().
|
inline |
Create a recipe widening Load, loading from Addr with Mask (may be null).
Definition at line 524 of file LoopVectorizationPlanner.h.
References DL, and llvm::Load.
Referenced by narrowInterleaveGroupOp().
|
inline |
Definition at line 515 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Definition at line 370 of file LoopVectorizationPlanner.h.
References DL, and llvm::DebugLoc::getUnknown().
Referenced by expandVPWidenIntOrFpInduction().
|
inline |
Create a recipe widening Store, storing StoredVal to Addr with Mask (may be null).
Definition at line 534 of file LoopVectorizationPlanner.h.
References DL, and llvm::Store.
|
inline |
Definition at line 354 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), llvm::Offset, and llvm::VPInstruction::WidePtrAdd.
|
inline |
Definition at line 150 of file LoopVectorizationPlanner.h.
References assert().
Referenced by createConsecutiveVectorPointer(), createElementCount(), createFirstActiveLane(), createLastActiveLane(), and createScalarIntrinsic().
|
inline |
Get the recipe at the current insert point or nullptr if the insert point is the end of the block.
Definition at line 162 of file LoopVectorizationPlanner.h.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions().
|
inlinestatic |
Create a VPBuilder to insert after R.
Definition at line 165 of file LoopVectorizationPlanner.h.
References VPBuilder().
Referenced by dissolveReplicateRegion(), fixupVFUsersForEVL(), llvm::VPlanTransforms::handleFindLastReductions(), preparePlanForEpilogueVectorLoop(), and llvm::VPlanTransforms::truncateToMinimalBitwidths().
Insert R at the current insertion point. Returns R unchanged.
Definition at line 183 of file LoopVectorizationPlanner.h.
References T.
Referenced by llvm::VPRecipeBuilder::replaceWithFinalIfReductionStore().
|
inline |
Sets the current insert point to a previously-saved location.
Definition at line 170 of file LoopVectorizationPlanner.h.
|
inline |
Set the current insert point.
Definition at line 173 of file LoopVectorizationPlanner.h.
References assert().
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExits(), and llvm::VPlanTransforms::truncateToMinimalBitwidths().
|
inline |
Definition at line 177 of file LoopVectorizationPlanner.h.
References assert().