LLVM 23.0.0git
llvm::VPTypeAnalysis Class Reference

An analysis for type-inference for VPValues. More...

#include "Transforms/Vectorize/VPlanAnalysis.h"

Public Member Functions

 VPTypeAnalysis (const VPlan &Plan)
TypeinferScalarType (const VPValue *V)
 Infer the type of V. Returns the scalar type of V.
LLVMContextgetContext ()
 Return the LLVMContext used by the analysis.

Detailed Description

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 46 of file VPlanAnalysis.h.

Constructor & Destructor Documentation

◆ VPTypeAnalysis()

VPTypeAnalysis::VPTypeAnalysis ( const VPlan & Plan)

Definition at line 27 of file VPlanAnalysis.cpp.

References getContext(), and llvm::VPlan::getVectorLoopRegion().

Member Function Documentation

◆ getContext()

LLVMContext & llvm::VPTypeAnalysis::getContext ( )
inline

Return the LLVMContext used by the analysis.

Definition at line 70 of file VPlanAnalysis.h.

Referenced by tryToFoldLiveIns(), and VPTypeAnalysis().

◆ inferScalarType()

Type * VPTypeAnalysis::inferScalarType ( const VPValue * V)

Infer the type of V. Returns the scalar type of V.

Definition at line 278 of file VPlanAnalysis.cpp.

References assert(), llvm::TypeSwitch< T, ResultT >::Case(), llvm::dyn_cast(), inferScalarType(), and llvm::isa().

Referenced by addLaneToStartIndex(), addStartIndexForScalarSteps(), llvm::VPlanTransforms::adjustFixedOrderRecurrences(), llvm::calculateRegisterUsageForPlan(), collectComplementaryPredicatedMemOps(), llvm::VPlanTransforms::convertEVLExitCond(), convertRecipesInRegionBlocksToSingleScalar(), llvm::VPlanTransforms::convertToConcreteRecipes(), llvm::VPlanTransforms::createInLoopReductionRecipes(), createScalarIVSteps(), expandVPWidenIntOrFpInduction(), expandVPWidenPointerInduction(), fixupVFUsersForEVL(), llvm::VPlanTransforms::foldTailByMasking(), llvm::vputils::getSCEVExprForVPValue(), inferScalarType(), isConsecutiveInterleaveGroup(), llvm::VPlanTransforms::materializeBackedgeTakenCount(), llvm::VPlanTransforms::materializeFactors(), llvm::VPVectorEndPointerRecipe::materializeOffset(), llvm::VPlanTransforms::materializePacksAndUnpacks(), llvm::VPlanTransforms::materializeVectorTripCount(), optimizeEarlyExitInductionUser(), llvm::VPlanTransforms::optimizeEVLMasks(), llvm::VPlanTransforms::optimizeFindIVReductions(), optimizeLatchExitInductionUser(), optimizeMaskToEVL(), preparePlanForMainVectorLoop(), simplifyRecipe(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToComputeEndValueForInduction(), tryToFoldLiveIns(), llvm::VPlanTransforms::unrollByUF(), and willGenerateVectors().


The documentation for this class was generated from the following files: