[llvm] [SVE] Don't require lookup when demangling vector function mappings (PR #72260)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 04:04:32 PST 2023
================
@@ -66,24 +66,26 @@ ParseRet tryParseMask(StringRef &MangledName, bool &IsMasked) {
/// vector length. On success, the `<vlen>` token is removed from
/// the input string `ParseString`.
///
-ParseRet tryParseVLEN(StringRef &ParseString, unsigned &VF, bool &IsScalable) {
+ParseRet tryParseVLEN(StringRef &ParseString,
----------------
huntergr-arm wrote:
That's pretty much the same thing expressed a different way -- we either have a valid non-zero fixed length VF, or we know that the VF is scalable but the minimum is yet to be determined.
It's a pity std::variant is so limited; something like Rust's enums would be great for this (or any language with sum types).
Maybe we could return a variant that's either an unsigned for a fixed VF, a dummy bool for scalable, or a ParseRet for failure?
https://github.com/llvm/llvm-project/pull/72260
More information about the llvm-commits
mailing list