LLVM  10.0.0
Functions | Variables
llvm::VFABI Namespace Reference

Functions

Optional< VFInfo > tryDemangleForVFABI (StringRef MangledName)
 Function to contruct a VFInfo out of a mangled names in the following format: More...
 
VFParamKind getVFParamKindFromString (const StringRef Token)
 Retrieve the VFParamKind from a string token. More...
 
void getVectorVariantNames (const CallInst &CI, SmallVectorImpl< std::string > &VariantMappings)
 Populates a set of strings representing the Vector Function ABI variants associated to the CallInst CI. More...
 
void setVectorVariantNames (CallInst *CI, const SmallVector< std::string, 8 > &VariantMappings)
 Overwrite the Vector Function ABI variants attribute with the names provide in VariantMappings. More...
 

Variables

static constexpr char const * _LLVM_ = "_LLVM_"
 LLVM Internal VFABI ISA token for vector functions. More...
 
static constexpr char const * MappingsAttrName = "vector-function-abi-variant"
 

Function Documentation

◆ getVectorVariantNames()

void llvm::VFABI::getVectorVariantNames ( const CallInst &  CI,
SmallVectorImpl< std::string > &  VariantMappings 
)

◆ getVFParamKindFromString()

VFParamKind llvm::VFABI::getVFParamKindFromString ( const StringRef  Token)

◆ setVectorVariantNames()

void llvm::VFABI::setVectorVariantNames ( CallInst *  CI,
const SmallVector< std::string, 8 > &  VariantMappings 
)

◆ tryDemangleForVFABI()

Optional< VFInfo > llvm::VFABI::tryDemangleForVFABI ( StringRef  MangledName)

Function to contruct a VFInfo out of a mangled names in the following format:

<VFABI_name>{(<redirection>)}

where <VFABI_name> is the name of the vector function, mangled according to the rules described in the Vector Function ABI of the target vector extentsion (or <isa> from now on). The <VFABI_name> is in the following format:

ZGV<isa><mask><vlen><parameters><scalarname>[(<redirection>)]

This methods support demangling rules for the following <isa>:

Parameters
MangledName-> input string in the format ZGV<isa><mask><vlen><parameters><scalarname>[(<redirection>)].

Definition at line 294 of file VFABIDemangling.cpp.

References assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::StringRef::consume_back(), llvm::StringRef::consume_front(), llvm::count_if(), llvm::SmallVectorBase::empty(), llvm::StringRef::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::Error, llvm::GlobalPredicate, llvm::tgtok::In, IsMasked(), llvm::LLVM, llvm::StringRef::ltrim(), llvm::None, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorBase::size(), and llvm::StringRef::take_while().

Referenced by getVectorVariantNames(), and setVectorVariantNames().

Variable Documentation

◆ _LLVM_

constexpr char const* llvm::VFABI::_LLVM_ = "_LLVM_"
static

LLVM Internal VFABI ISA token for vector functions.

Definition at line 133 of file VectorUtils.h.

Referenced by mangleTLIName().

◆ MappingsAttrName

constexpr char const* llvm::VFABI::MappingsAttrName = "vector-function-abi-variant"
static

Definition at line 162 of file VectorUtils.h.

Referenced by getVectorVariantNames(), and setVectorVariantNames().