LLVM 20.0.0git
|
Struct to hold various analysis needed for cost computations. More...
#include "Transforms/Vectorize/VPlan.h"
Public Member Functions | |
VPCostContext (const TargetTransformInfo &TTI, const TargetLibraryInfo &TLI, Type *CanIVTy, LoopVectorizationCostModel &CM) | |
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. | |
TargetTransformInfo::OperandValueInfo | getOperandInfo (VPValue *V) const |
Returns the OperandInfo for V , if it is a live-in. | |
Public Attributes | |
const TargetTransformInfo & | TTI |
const TargetLibraryInfo & | TLI |
VPTypeAnalysis | Types |
LLVMContext & | LLVMCtx |
LoopVectorizationCostModel & | CM |
SmallPtrSet< Instruction *, 8 > | SkipCostComputation |
Struct to hold various analysis needed for cost computations.
|
inline |
InstructionCost VPCostContext::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.
Definition at line 7268 of file LoopVectorize.cpp.
References CM, ForceTargetInstructionCost, and llvm::LoopVectorizationCostModel::getInstructionCost().
Referenced by llvm::VPWidenRecipe::computeCost(), and llvm::VPReplicateRecipe::computeCost().
TargetTransformInfo::OperandValueInfo VPCostContext::getOperandInfo | ( | VPValue * | V | ) | const |
Returns the OperandInfo for V
, if it is a live-in.
Definition at line 1654 of file VPlan.cpp.
References llvm::TargetTransformInfo::getOperandInfo().
Referenced by llvm::VPWidenSelectRecipe::computeCost().
bool VPCostContext::skipCostComputation | ( | Instruction * | UI, |
bool | IsVector | ||
) | const |
Return true if the cost for UI
shouldn't be computed, e.g.
because it has already been pre-computed.
Definition at line 7275 of file LoopVectorize.cpp.
References CM, SkipCostComputation, llvm::LoopVectorizationCostModel::ValuesToIgnore, and llvm::LoopVectorizationCostModel::VecValuesToIgnore.
Referenced by llvm::VPRecipeBase::cost().
LoopVectorizationCostModel& llvm::VPCostContext::CM |
Definition at line 687 of file VPlan.h.
Referenced by getLegacyCost(), and skipCostComputation().
LLVMContext& llvm::VPCostContext::LLVMCtx |
Definition at line 686 of file VPlan.h.
Referenced by llvm::VPHistogramRecipe::computeCost().
SmallPtrSet<Instruction *, 8> llvm::VPCostContext::SkipCostComputation |
Definition at line 688 of file VPlan.h.
Referenced by llvm::VPReplicateRecipe::computeCost(), and skipCostComputation().
const TargetLibraryInfo& llvm::VPCostContext::TLI |
Definition at line 684 of file VPlan.h.
Referenced by llvm::VPWidenRecipe::computeCost().
const TargetTransformInfo& llvm::VPCostContext::TTI |
Definition at line 683 of file VPlan.h.
Referenced by llvm::VPWidenRecipe::computeCost(), llvm::VPWidenCastRecipe::computeCost(), llvm::VPWidenIntrinsicRecipe::computeCost(), llvm::VPWidenCallRecipe::computeCost(), llvm::VPHistogramRecipe::computeCost(), llvm::VPWidenSelectRecipe::computeCost(), llvm::VPHeaderPHIRecipe::computeCost(), llvm::VPFirstOrderRecurrencePHIRecipe::computeCost(), llvm::VPBlendRecipe::computeCost(), llvm::VPInterleaveRecipe::computeCost(), llvm::VPReductionRecipe::computeCost(), llvm::VPWidenMemoryRecipe::computeCost(), llvm::VPWidenLoadEVLRecipe::computeCost(), llvm::VPWidenStoreEVLRecipe::computeCost(), and llvm::VPRegionBlock::cost().
VPTypeAnalysis llvm::VPCostContext::Types |
Definition at line 685 of file VPlan.h.
Referenced by llvm::VPWidenRecipe::computeCost(), llvm::VPWidenCastRecipe::computeCost(), llvm::VPWidenIntrinsicRecipe::computeCost(), llvm::VPHistogramRecipe::computeCost(), llvm::VPWidenSelectRecipe::computeCost(), llvm::VPFirstOrderRecurrencePHIRecipe::computeCost(), llvm::VPBlendRecipe::computeCost(), llvm::VPInterleaveRecipe::computeCost(), and llvm::VPReductionRecipe::computeCost().