[llvm] [Analysis][NFC] Make VecDesc constexpr and relocation-free (PR #201145)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 04:49:26 PDT 2026
================
@@ -43,27 +43,40 @@ template <typename T> class ArrayRef;
/// <scalarname> = the name of the scalar function.
/// <vectorname> = the name of the vector function.
class VecDesc {
- StringRef ScalarFnName;
- StringRef VectorFnName;
- ElementCount VectorizationFactor;
- bool Masked;
- StringRef VABIPrefix;
- std::optional<CallingConv::ID> CC;
+ template <size_t, size_t> friend struct VecDescTable;
+
+ // String offsets are relative to the this pointer.
+ uint16_t ScalarFnNameOff = 0;
+ uint16_t ScalarFnNameSize = 0;
+ uint16_t VectorFnNameOff = 0;
+ uint16_t VectorFnNameSize = 0;
+ ElementCount VectorizationFactor = {};
----------------
arsenm wrote:
```suggestion
ElementCount VectorizationFactor;
```
https://github.com/llvm/llvm-project/pull/201145
More information about the llvm-commits
mailing list