|
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 101 of file LoopVectorizationPlanner.h.
|
default |
Referenced by getToInsertAfter(), and llvm::VPBuilder::InsertPointGuard::InsertPointGuard().
|
inline |
Definition at line 158 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 159 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 277 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
Referenced by handleUncountableExitsWithSideEffects(), and preparePlanForEpilogueVectorLoop().
|
inline |
Definition at line 260 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 1620 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 1648 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 410 of file LoopVectorizationPlanner.h.
Referenced by tryToComputeEndValueForInduction().
|
inline |
Definition at line 389 of file LoopVectorizationPlanner.h.
References createOverflowingOp(), createVScale(), llvm::VPlan::getConstantInt(), getPlan(), llvm::isPowerOf2_32(), and llvm::Log2_32().
|
inline |
Definition at line 508 of file LoopVectorizationPlanner.h.
|
inline |
Create a new FCmp VPInstruction with predicate Pred and operands A and B.
Definition at line 331 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 224 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 |
Definition at line 467 of file LoopVectorizationPlanner.h.
References createNaryOp(), DL, and llvm::DebugLoc::getUnknown().
|
inline |
Create a new ICmp VPInstruction with predicate Pred and operands A and B.
Definition at line 320 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 235 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 292 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 298 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 208 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), and Operands.
|
inline |
Definition at line 204 of file LoopVectorizationPlanner.h.
|
inline |
Create an N-ary operation with Opcode, Operands and set Inst as its underlying Instruction.
Definition at line 192 of file LoopVectorizationPlanner.h.
References Operands.
Referenced by addBypassBranch(), addInitialSkeleton(), llvm::VPlanTransforms::adjustFirstOrderRecurrenceMiddleUsers(), createAnyOfReduction(), createFreeze(), createLogicalAnd(), createLogicalOr(), llvm::VPlanTransforms::expandBranchOnTwoConds(), llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExits(), handleUncountableExitsWithSideEffects(), llvm::VPlanTransforms::optimizeFindIVReductions(), preparePlanForMainVectorLoop(), and tryToSinkOrHoistRecurrenceUsers().
|
inline |
Definition at line 216 of file LoopVectorizationPlanner.h.
References Operands.
|
inline |
Definition at line 254 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 353 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::Offset, and llvm::VPInstruction::PtrAdd.
Referenced by createPtrAdd().
|
inline |
Definition at line 267 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 246 of file LoopVectorizationPlanner.h.
References Operands.
Referenced by createElementCount(), and llvm::VPRegionBlock::getOrCreateCanonicalIVIncrement().
|
inline |
Definition at line 347 of file LoopVectorizationPlanner.h.
References createNoWrapPtrAdd(), DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), and llvm::Offset.
|
inline |
Definition at line 418 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createScalarSExtOrTrunc(), createScalarZExtOrTrunc(), and tryToComputeEndValueForInduction().
|
inline |
Create a scalar call to the intrinsic IntrinsicID with Operands, and result type ResultTy.
Definition at line 429 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 500 of file LoopVectorizationPlanner.h.
References DL, llvm::FPMathOperator::getFastMathFlags(), and IV.
|
inline |
Create a phi with IncomingValues, using the default flags for the result type, unless Flags is set.
Definition at line 371 of file LoopVectorizationPlanner.h.
References DL, llvm::VPIRFlags::getDefaultFlags(), and llvm::DebugLoc::getUnknown().
Referenced by addInitialSkeleton(), llvm::VPlanTransforms::convertToVariableLengthStep(), llvm::VPRegionBlock::dissolveToCFGLoop(), preparePlanForMainVectorLoop(), and llvm::vputils::reconstructSSA().
|
inline |
Definition at line 456 of file LoopVectorizationPlanner.h.
References createScalarCast(), DL, and llvm::Type::getScalarSizeInBits().
|
inline |
Definition at line 445 of file LoopVectorizationPlanner.h.
References createScalarCast(), DL, and llvm::Type::getScalarSizeInBits().
Referenced by fixupVFUsersForEVL(), handleUncountableExitsWithSideEffects(), optimizeMaskToEVL(), and llvm::VPlanTransforms::simplifyKnownEVL().
|
inline |
Create a select of TrueVal and FalseVal based on Cond, using the default flags for the result type, unless Flags is set.
Definition at line 306 of file LoopVectorizationPlanner.h.
References Cond, DL, llvm::VPIRFlags::getDefaultFlags(), 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 482 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 285 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
|
inline |
Definition at line 513 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createConsecutiveVectorPointer().
|
inline |
Create a scalar llvm.vscale call.
Definition at line 440 of file LoopVectorizationPlanner.h.
References createScalarIntrinsic(), DL, and llvm::DebugLoc::getUnknown().
Referenced by createElementCount().
|
inline |
Definition at line 472 of file LoopVectorizationPlanner.h.
References assert(), and 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 534 of file LoopVectorizationPlanner.h.
References DL, and llvm::Load.
Referenced by narrowInterleaveGroupOp().
|
inline |
Definition at line 525 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Definition at line 383 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 544 of file LoopVectorizationPlanner.h.
References DL, and llvm::Store.
|
inline |
Definition at line 361 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), llvm::Offset, and llvm::VPInstruction::WidePtrAdd.
|
inline |
Definition at line 152 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 164 of file LoopVectorizationPlanner.h.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions().
|
inlinestatic |
Create a VPBuilder to insert after R.
Definition at line 167 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 185 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 172 of file LoopVectorizationPlanner.h.
|
inline |
Set the current insert point.
Definition at line 175 of file LoopVectorizationPlanner.h.
References assert().
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExits(), and llvm::VPlanTransforms::truncateToMinimalBitwidths().
|
inline |
Definition at line 179 of file LoopVectorizationPlanner.h.
References assert().