LLVM 22.0.0git
|
An analysis for type-inference for VPValues. More...
#include "Transforms/Vectorize/VPlanAnalysis.h"
Public Member Functions | |
VPTypeAnalysis (const VPlan &Plan) | |
Type * | inferScalarType (const VPValue *V) |
Infer the type of V . Returns the scalar type of V . | |
LLVMContext & | getContext () |
Return the LLVMContext used by the analysis. | |
An analysis for type-inference for VPValues.
It infers the scalar type for a given VPValue by bottom-up traversing through defining recipes until root nodes with known types are reached (e.g. live-ins or load recipes). The types are then propagated top down through operations. Note that the analysis caches the inferred types. A new analysis object must be constructed once a VPlan has been modified in a way that invalidates any of the previously inferred types.
Definition at line 43 of file VPlanAnalysis.h.
Definition at line 24 of file VPlanAnalysis.cpp.
References llvm::Type::getScalarType(), llvm::VPlan::getTripCount(), and llvm::VPlan::getVectorLoopRegion().
|
inline |
Return the LLVMContext used by the analysis.
Definition at line 67 of file VPlanAnalysis.h.
Referenced by llvm::VPBlendRecipe::computeCost(), and tryToFoldLiveIns().
Infer the type of V
. Returns the scalar type of V
.
Definition at line 260 of file VPlanAnalysis.cpp.
References assert(), llvm::TypeSwitch< T, ResultT >::Case(), and inferScalarType().
Referenced by addResumePhiRecipeForInduction(), llvm::calculateRegisterUsageForPlan(), llvm::VPlanTransforms::canonicalizeEVLLoops(), llvm::VPInstruction::computeCost(), llvm::VPWidenCastRecipe::computeCost(), llvm::VPHistogramRecipe::computeCost(), llvm::VPWidenSelectRecipe::computeCost(), llvm::VPBlendRecipe::computeCost(), llvm::VPInterleaveRecipe::computeCost(), llvm::VPReductionRecipe::computeCost(), llvm::VPPartialReductionRecipe::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::VPExpressionRecipe::computeCost(), llvm::VPWidenMemoryRecipe::computeCost(), llvm::VPlanTransforms::convertToConcreteRecipes(), createScalarIVSteps(), llvm::VPPhi::execute(), llvm::VPWidenRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), expandVPWidenIntOrFpInduction(), expandVPWidenPointerInduction(), getCostForIntrinsics(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), inferScalarType(), isConsecutiveInterleaveGroup(), llvm::VPlanTransforms::materializeBackedgeTakenCount(), llvm::VPlanTransforms::materializeBuildVectors(), llvm::VPlanTransforms::materializeVectorTripCount(), llvm::VPlanTransforms::materializeVFAndVFxUF(), optimizeEarlyExitInductionUser(), optimizeLatchExitInductionUser(), optimizeMaskToEVL(), scalarizeInstruction(), simplifyRecipe(), transformRecipestoEVLRecipes(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToFoldLiveIns(), tryToMatchAndCreateExtendedReduction(), tryToMatchAndCreateMulAccumulateReduction(), and willGenerateVectors().