Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
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, std::optional< CallingConv::ID > Conv)
StringRef getScalarFnName () const
StringRef getVectorFnName () const
ElementCount getVectorizationFactor () const
bool isMasked () const
StringRef getVABIPrefix () const
std::optional< CallingConv::IDgetCallingConv () const
LLVM_ABI 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 43 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,
std::optional< CallingConv::ID > Conv )
inline

Definition at line 53 of file TargetLibraryInfo.h.

Member Function Documentation

◆ getCallingConv()

std::optional< CallingConv::ID > llvm::VecDesc::getCallingConv ( ) const
inline

Definition at line 65 of file TargetLibraryInfo.h.

Referenced by addVariantDeclaration().

◆ getScalarFnName()

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

Definition at line 60 of file TargetLibraryInfo.h.

◆ getVABIPrefix()

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

Definition at line 64 of file TargetLibraryInfo.h.

◆ getVectorFnName()

◆ 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(), and llvm::raw_svector_ostream::str().

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

◆ getVectorizationFactor()

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

Definition at line 62 of file TargetLibraryInfo.h.

◆ isMasked()

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

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