|
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 100 of file LoopVectorizationPlanner.h.
|
default |
Referenced by getToInsertAfter(), and llvm::VPBuilder::InsertPointGuard::InsertPointGuard().
|
inline |
Definition at line 157 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 158 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 276 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
Referenced by handleUncountableExitsWithSideEffects(), and preparePlanForEpilogueVectorLoop().
|
inline |
Definition at line 259 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 409 of file LoopVectorizationPlanner.h.
Referenced by tryToComputeEndValueForInduction().
|
inline |
Definition at line 388 of file LoopVectorizationPlanner.h.
References createOverflowingOp(), createVScale(), llvm::VPlan::getConstantInt(), getPlan(), llvm::isPowerOf2_32(), and llvm::Log2_32().
|
inline |
Definition at line 510 of file LoopVectorizationPlanner.h.
|
inline |
Create a new FCmp VPInstruction with predicate Pred and operands A and B.
Definition at line 330 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 223 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 319 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 234 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 291 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 297 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 207 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), and Operands.
|
inline |
Definition at line 203 of file LoopVectorizationPlanner.h.
|
inline |
Create an N-ary operation with Opcode, Operands and set Inst as its underlying Instruction.
Definition at line 191 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 215 of file LoopVectorizationPlanner.h.
References Operands.
|
inline |
Definition at line 253 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 352 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::Offset, and llvm::VPInstruction::PtrAdd.
Referenced by createPtrAdd().
|
inline |
Definition at line 266 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 245 of file LoopVectorizationPlanner.h.
References Operands.
Referenced by createElementCount(), and llvm::VPRegionBlock::getOrCreateCanonicalIVIncrement().
|
inline |
Definition at line 346 of file LoopVectorizationPlanner.h.
References createNoWrapPtrAdd(), DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), and llvm::Offset.
|
inline |
Definition at line 424 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createScalarSExtOrTrunc(), createScalarZExtOrTrunc(), and tryToComputeEndValueForInduction().
Definition at line 473 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Create a scalar call to the intrinsic IntrinsicID with Operands, and result type ResultTy.
Definition at line 435 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 502 of file LoopVectorizationPlanner.h.
References DL, llvm::FPMathOperator::getFastMathFlags(), and IV.
|
inline |
Definition at line 417 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Create a phi with IncomingValues, using the default flags for the result type, unless Flags is set.
Definition at line 370 of file LoopVectorizationPlanner.h.
References DL, llvm::VPIRFlags::getDefaultFlags(), and llvm::DebugLoc::getUnknown().
Referenced by addInitialSkeleton(), llvm::VPlanTransforms::convertToVariableLengthStep(), llvm::VPRegionBlock::dissolveToCFGLoop(), and preparePlanForMainVectorLoop().
|
inline |
Definition at line 462 of file LoopVectorizationPlanner.h.
References createScalarCast(), DL, and llvm::Type::getScalarSizeInBits().
|
inline |
Definition at line 451 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 305 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 486 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 284 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
|
inline |
Definition at line 515 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createConsecutiveVectorPointer().
|
inline |
Create a scalar llvm.vscale call.
Definition at line 446 of file LoopVectorizationPlanner.h.
References createScalarIntrinsic(), DL, and llvm::DebugLoc::getUnknown().
Referenced by createElementCount().
|
inline |
Definition at line 478 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 536 of file LoopVectorizationPlanner.h.
References DL, and llvm::Load.
Referenced by narrowInterleaveGroupOp().
|
inline |
Definition at line 527 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Definition at line 382 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 546 of file LoopVectorizationPlanner.h.
References DL, and llvm::Store.
|
inline |
Definition at line 360 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), llvm::Offset, and llvm::VPInstruction::WidePtrAdd.
|
inline |
Definition at line 151 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 163 of file LoopVectorizationPlanner.h.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions().
|
inlinestatic |
Create a VPBuilder to insert after R.
Definition at line 166 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 184 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 171 of file LoopVectorizationPlanner.h.
|
inline |
Set the current insert point.
Definition at line 174 of file LoopVectorizationPlanner.h.
References assert().
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExits(), and llvm::VPlanTransforms::truncateToMinimalBitwidths().
|
inline |
Definition at line 178 of file LoopVectorizationPlanner.h.
References assert().