|
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 106 of file LoopVectorizationPlanner.h.
|
default |
Referenced by getToInsertAfter(), and llvm::VPBuilder::InsertPointGuard::InsertPointGuard().
|
inline |
Definition at line 163 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 164 of file LoopVectorizationPlanner.h.
|
inline |
Definition at line 282 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
Referenced by handleUncountableExitsWithSideEffects(), and preparePlanForEpilogueVectorLoop().
|
inline |
Definition at line 265 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 1674 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 1702 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 415 of file LoopVectorizationPlanner.h.
Referenced by tryToComputeEndValueForInduction().
|
inline |
Definition at line 394 of file LoopVectorizationPlanner.h.
References createOverflowingOp(), createVScale(), llvm::VPlan::getConstantInt(), getPlan(), llvm::isPowerOf2_32(), and llvm::Log2_32().
|
inline |
Definition at line 516 of file LoopVectorizationPlanner.h.
|
inline |
Create a new FCmp VPInstruction with predicate Pred and operands A and B.
Definition at line 336 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 229 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 325 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 240 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 297 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 303 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 213 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), and Operands.
|
inline |
Definition at line 209 of file LoopVectorizationPlanner.h.
|
inline |
Create an N-ary operation with Opcode, Operands and set Inst as its underlying Instruction.
Definition at line 197 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 221 of file LoopVectorizationPlanner.h.
References Operands.
|
inline |
Definition at line 259 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 358 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::Offset, and llvm::VPInstruction::PtrAdd.
Referenced by createPtrAdd().
|
inline |
Definition at line 272 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 251 of file LoopVectorizationPlanner.h.
References Operands.
Referenced by createElementCount(), and llvm::VPRegionBlock::getOrCreateCanonicalIVIncrement().
|
inline |
Definition at line 352 of file LoopVectorizationPlanner.h.
References createNoWrapPtrAdd(), DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), and llvm::Offset.
|
inline |
Definition at line 430 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createScalarSExtOrTrunc(), createScalarZExtOrTrunc(), and tryToComputeEndValueForInduction().
Definition at line 479 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Create a scalar call to the intrinsic IntrinsicID with Operands, and result type ResultTy.
Definition at line 441 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 508 of file LoopVectorizationPlanner.h.
References DL, llvm::FPMathOperator::getFastMathFlags(), and IV.
|
inline |
Definition at line 423 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 376 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 468 of file LoopVectorizationPlanner.h.
References createScalarCast(), DL, and llvm::Type::getScalarSizeInBits().
|
inline |
Definition at line 457 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 311 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 492 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 290 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), LHS, and RHS.
|
inline |
Definition at line 521 of file LoopVectorizationPlanner.h.
References DL.
Referenced by createConsecutiveVectorPointer().
|
inline |
Create a scalar llvm.vscale call.
Definition at line 452 of file LoopVectorizationPlanner.h.
References createScalarIntrinsic(), DL, and llvm::DebugLoc::getUnknown().
Referenced by createElementCount().
|
inline |
Definition at line 484 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 542 of file LoopVectorizationPlanner.h.
References DL, and llvm::Load.
Referenced by narrowInterleaveGroupOp().
|
inline |
Definition at line 533 of file LoopVectorizationPlanner.h.
References DL.
|
inline |
Definition at line 388 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 552 of file LoopVectorizationPlanner.h.
References DL, and llvm::Store.
|
inline |
Definition at line 366 of file LoopVectorizationPlanner.h.
References DL, llvm::DebugLoc::getUnknown(), llvm::GEPNoWrapFlags::none(), llvm::Offset, and llvm::VPInstruction::WidePtrAdd.
|
inline |
Definition at line 157 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 169 of file LoopVectorizationPlanner.h.
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions().
|
inlinestatic |
Create a VPBuilder to insert after R.
Definition at line 172 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 190 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 177 of file LoopVectorizationPlanner.h.
|
inline |
Set the current insert point.
Definition at line 180 of file LoopVectorizationPlanner.h.
References assert().
Referenced by llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExits(), and llvm::VPlanTransforms::truncateToMinimalBitwidths().
|
inline |
Definition at line 184 of file LoopVectorizationPlanner.h.
References assert().