LLVM: llvm::VPCostContext Struct Reference (original) (raw)
Struct to hold various analysis needed for cost computations. More...
#include "[Transforms/Vectorize/VPlanHelpers.h](VPlanHelpers%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| VPCostContext (const TargetTransformInfo &TTI, const TargetLibraryInfo &TLI, const VPlan &Plan, LoopVectorizationCostModel &CM, TargetTransformInfo::TargetCostKind CostKind, ScalarEvolution &SE, const Loop *L) | |
| InstructionCost | getLegacyCost (Instruction *UI, ElementCount VF) const |
| Return the cost for UI with VF using the legacy cost model as fallback until computing the cost of all recipes migrates to VPlan. | |
| bool | skipCostComputation (Instruction *UI, bool IsVector) const |
| Return true if the cost for UI shouldn't be computed, e.g. | |
| unsigned | getPredBlockCostDivisor (BasicBlock *BB) const |
| TargetTransformInfo::OperandValueInfo | getOperandInfo (VPValue *V) const |
| Returns the OperandInfo for V, if it is a live-in. | |
| bool | isLegacyUniformAfterVectorization (Instruction *I, ElementCount VF) const |
| Return true if I is considered uniform-after-vectorization in the legacy cost model for VF. | |
| InstructionCost | getScalarizationOverhead (Type *ResultTy, ArrayRef< const VPValue * > Operands, ElementCount VF, bool AlwaysIncludeReplicatingR=false) |
| Estimate the overhead of scalarizing a recipe with result type ResultTy and Operands with VF. |
| Public Attributes | |
|---|---|
| const TargetTransformInfo & | TTI |
| const TargetLibraryInfo & | TLI |
| VPTypeAnalysis | Types |
| LLVMContext & | LLVMCtx |
| LoopVectorizationCostModel & | CM |
| SmallPtrSet< Instruction *, 8 > | SkipCostComputation |
| TargetTransformInfo::TargetCostKind | CostKind |
| ScalarEvolution & | SE |
| const Loop * | L |
Struct to hold various analysis needed for cost computations.
Definition at line 329 of file VPlanHelpers.h.
◆ getLegacyCost()
◆ getOperandInfo()
◆ getPredBlockCostDivisor()
◆ getScalarizationOverhead()
Estimate the overhead of scalarizing a recipe with result type ResultTy and Operands with VF.
This is a convenience wrapper for the type-based getScalarizationOverhead API. If AlwaysIncludeReplicatingR is true, always compute the cost of scalarizing replicating operands.
Definition at line 1736 of file VPlan.cpp.
References assert(), llvm::cast(), CostKind, llvm::APInt::getAllOnes(), llvm::getContainedTypes(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::isa(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), llvm::ElementCount::isScalar(), llvm::Type::isVoidTy(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::to_vector(), llvm::toVectorizedTy(), TTI, and Types.
◆ isLegacyUniformAfterVectorization()
◆ skipCostComputation()
◆ CM
◆ CostKind
◆ L
◆ LLVMCtx
◆ SE
◆ SkipCostComputation
◆ TLI
◆ TTI
◆ Types
The documentation for this struct was generated from the following files:
- lib/Transforms/Vectorize/VPlanHelpers.h
- lib/Transforms/Vectorize/LoopVectorize.cpp
- lib/Transforms/Vectorize/VPlan.cpp