LLVM: lib/IR/VFABIDemangler.cpp File Reference (original) (raw)
Go to the source code of this file.
| Macros | |
|---|---|
| #define | DEBUG_TYPE "vfabi-demangler" |
| Functions | |
|---|---|
| static ParseRet | tryParseISA (StringRef &MangledName, VFISAKind &ISA) |
| Extracts the information from the mangled string, and sets the ISA accordingly. | |
| static ParseRet | tryParseMask (StringRef &MangledName, bool &IsMasked) |
| Extracts the information from the mangled string, and sets IsMasked accordingly. | |
| static ParseRet | tryParseVLEN (StringRef &ParseString, VFISAKind ISA, std::pair< unsigned, bool > &ParsedVF) |
| Extract the information from the mangled string, and sets ParsedVF accordingly. | |
| static ParseRet | tryParseLinearTokenWithRuntimeStep (StringRef &ParseString, VFParamKind &PKind, int &Pos, const StringRef Token) |
| The function looks for the following strings at the beginning of the input string ParseString: | |
| static ParseRet | tryParseLinearWithRuntimeStep (StringRef &ParseString, VFParamKind &PKind, int &StepOrPos) |
| The function looks for the following string at the beginning of the input string ParseString: | |
| static ParseRet | tryParseCompileTimeLinearToken (StringRef &ParseString, VFParamKind &PKind, int &LinearStep, const StringRef Token) |
| The function looks for the following strings at the beginning of the input string ParseString: | |
| static ParseRet | tryParseLinearWithCompileTimeStep (StringRef &ParseString, VFParamKind &PKind, int &StepOrPos) |
| The function looks for the following strings at the beginning of the input string ParseString: | |
| static ParseRet | tryParseParameter (StringRef &ParseString, VFParamKind &PKind, int &StepOrPos) |
| Looks into the part of the mangled name in search for valid paramaters at the beginning of the string ParseString. | |
| static ParseRet | tryParseAlign (StringRef &ParseString, Align &Alignment) |
| Looks into the part of the mangled name in search of a valid 'aligned' clause. | |
| static std::optional< ElementCount > | getElementCountForTy (const VFISAKind ISA, const Type *Ty) |
| static std::optional< ElementCount > | getScalableECFromSignature (const FunctionType *Signature, const VFISAKind ISA, const SmallVectorImpl< VFParameter > &Params) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "vfabi-demangler"
◆ getElementCountForTy()
◆ getScalableECFromSignature()
Definition at line 325 of file VFABIDemangler.cpp.
References llvm::dyn_cast(), llvm::getContainedTypes(), getElementCountForTy(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::ElementCount::getScalable(), llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::isKnownLT(), llvm::isUnpackedStructLiteral(), llvm::Type::isVoidTy(), and llvm::Vector.
Referenced by llvm::VFABI::tryDemangleForVFABI().
◆ tryParseAlign()
◆ tryParseCompileTimeLinearToken()
The function looks for the following strings at the beginning of the input string ParseString:
{"n"}
On success, it removes the parsed parameter from ParseString, sets PKind to the correspondent enum value, sets LinearStep to , and return success. On a syntax error, it return a parsing error. If nothing is parsed, it returns std::nullopt.
The function expects to be one of "l", "R", "U" or "L".
Definition at line 186 of file VFABIDemangler.cpp.
References llvm::StringRef::consume_front(), llvm::StringRef::consumeInteger(), and llvm::VFABI::getVFParamKindFromString().
Referenced by tryParseLinearWithCompileTimeStep().
◆ tryParseISA()
Extracts the information from the mangled string, and sets the ISA accordingly.
If successful, the token is removed from the input string MangledName.
Definition at line 37 of file VFABIDemangler.cpp.
References llvm::VFABI::_LLVM_, llvm::AdvancedSIMD, llvm::AVX, llvm::AVX2, llvm::AVX512, llvm::StringSwitch< T, R >::Case(), llvm::StringRef::consume_front(), llvm::StringSwitch< T, R >::Default(), llvm::StringRef::drop_front(), llvm::StringRef::empty(), llvm::LLVM, llvm::RVV, llvm::SSE, llvm::SVE, llvm::StringRef::take_front(), and llvm::Unknown.
Referenced by llvm::VFABI::tryDemangleForVFABI().
◆ tryParseLinearTokenWithRuntimeStep()
The function looks for the following strings at the beginning of the input string ParseString:
On success, it removes the parsed parameter from ParseString, sets PKind to the correspondent enum value, sets Pos to , and return success. On a syntax error, it return a parsing error. If nothing is parsed, it returns std::nullopt.
The function expects to be one of "ls", "Rs", "Us" or "Ls".
Definition at line 122 of file VFABIDemangler.cpp.
References llvm::StringRef::consume_front(), llvm::StringRef::consumeInteger(), and llvm::VFABI::getVFParamKindFromString().
Referenced by tryParseLinearWithRuntimeStep().
◆ tryParseLinearWithCompileTimeStep()
| ParseRet tryParseLinearWithCompileTimeStep ( StringRef & ParseString, VFParamKind & PKind, int & StepOrPos ) | static |
|---|
The function looks for the following strings at the beginning of the input string ParseString:
["l" | "R" | "U" | "L"] {"n"}
On success, it removes the parsed parameter from ParseString, sets PKind to the correspondent enum value, sets LinearStep to , and return success. On a syntax error, it return a parsing error. If nothing is parsed, it returns std::nullopt.
Definition at line 212 of file VFABIDemangler.cpp.
References tryParseCompileTimeLinearToken().
Referenced by tryParseParameter().
◆ tryParseLinearWithRuntimeStep()
| ParseRet tryParseLinearWithRuntimeStep ( StringRef & ParseString, VFParamKind & PKind, int & StepOrPos ) | static |
|---|
The function looks for the following string at the beginning of the input string ParseString:
is one of "ls", "Rs", "Us" or "Ls".
On success, it removes the parsed parameter from ParseString, sets PKind to the correspondent enum value, sets StepOrPos to , and return success. On a syntax error, it return a parsing error. If nothing is parsed, it returns std::nullopt.
Definition at line 146 of file VFABIDemangler.cpp.
References tryParseLinearTokenWithRuntimeStep().
Referenced by tryParseParameter().
◆ tryParseMask()
| ParseRet tryParseMask ( StringRef & MangledName, bool & IsMasked ) | static |
|---|
◆ tryParseParameter()
Looks into the part of the mangled name in search for valid paramaters at the beginning of the string ParseString.
On success, it removes the parsed parameter from ParseString, sets PKind to the correspondent enum value, sets StepOrPos accordingly, and return success. On a syntax error, it return a parsing error. If nothing is parsed, it returns std::nullopt.
Definition at line 246 of file VFABIDemangler.cpp.
References llvm::StringRef::consume_front(), llvm::OMP_Uniform, tryParseLinearWithCompileTimeStep(), tryParseLinearWithRuntimeStep(), and llvm::Vector.
Referenced by llvm::VFABI::tryDemangleForVFABI().