LLVM 20.0.0git
Public Member Functions | List of all members
llvm::VecDesc Class Reference

Provides info so a possible vectorization of a function can be computed. More...

#include "llvm/Analysis/TargetLibraryInfo.h"

Public Member Functions

 VecDesc ()=delete
 
 VecDesc (StringRef ScalarFnName, StringRef VectorFnName, ElementCount VectorizationFactor, bool Masked, StringRef VABIPrefix)
 
StringRef getScalarFnName () const
 
StringRef getVectorFnName () const
 
ElementCount getVectorizationFactor () const
 
bool isMasked () const
 
StringRef getVABIPrefix () const
 
std::string getVectorFunctionABIVariantString () const
 Returns a vector function ABI variant string on the form: ZGV<isa><mask><vlen><vparams><scalarname>(<vectorname>)
 

Detailed Description

Provides info so a possible vectorization of a function can be computed.

Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized by a factor 'VectorizationFactor'. The VABIPrefix string holds information about isa, mask, vlen, and vparams so a scalar-to-vector mapping of the form: ZGV<isa><mask><vlen><vparams><scalarname>(<vectorname>) can be constructed where:

<isa> = "_LLVM_" <mask> = "M" if masked, "N" if no mask. <vlen> = Number of concurrent lanes, stored in the VectorizationFactor field of the VecDesc struct. If the number of lanes is scalable then 'x' is printed instead. <vparams> = "v", as many as are the numArgs. <scalarname> = the name of the scalar function. <vectorname> = the name of the vector function.

Definition at line 40 of file TargetLibraryInfo.h.

Constructor & Destructor Documentation

◆ VecDesc() [1/2]

llvm::VecDesc::VecDesc ( )
delete

◆ VecDesc() [2/2]

llvm::VecDesc::VecDesc ( StringRef  ScalarFnName,
StringRef  VectorFnName,
ElementCount  VectorizationFactor,
bool  Masked,
StringRef  VABIPrefix 
)
inline

Definition at line 49 of file TargetLibraryInfo.h.

References llvm::Masked.

Member Function Documentation

◆ getScalarFnName()

StringRef llvm::VecDesc::getScalarFnName ( ) const
inline

Definition at line 55 of file TargetLibraryInfo.h.

◆ getVABIPrefix()

StringRef llvm::VecDesc::getVABIPrefix ( ) const
inline

Definition at line 59 of file TargetLibraryInfo.h.

◆ getVectorFnName()

StringRef llvm::VecDesc::getVectorFnName ( ) const
inline

◆ getVectorFunctionABIVariantString()

std::string VecDesc::getVectorFunctionABIVariantString ( ) const

Returns a vector function ABI variant string on the form: ZGV<isa><mask><vlen><vparams><scalarname>(<vectorname>)

Definition at line 51 of file TargetLibraryInfo.cpp.

References assert(), llvm::StringRef::empty(), and llvm::raw_svector_ostream::str().

Referenced by addMappingsFromTLI(), addVariantDeclaration(), and replaceWithCallToVeclib().

◆ getVectorizationFactor()

ElementCount llvm::VecDesc::getVectorizationFactor ( ) const
inline

Definition at line 57 of file TargetLibraryInfo.h.

◆ isMasked()

bool llvm::VecDesc::isMasked ( ) const
inline

Definition at line 58 of file TargetLibraryInfo.h.

References llvm::Masked.


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