[Clang][RISCV] Record the LMUL and mask ratio in RVV fixed-length vector kinds (#237845)

A riscv_rvv_vector_bits typedef keeps only the element type and count,
and later stages re-derive the LMUL of a data type, or the ratio R of a
vbool<R>_t mask type, from VLEN. That breaks once typedefs may be
shorter than VLEN * LMUL, or VLEN / R for masks.

Split VectorKind::RVVFixedLengthData into RVVFixedLengthData_MF8 to _M8,
and RVVFixedLengthMask{,_1,_2,_4} into RVVFixedLengthMaskRatio<R> and
RVVFixedLengthMaskRatio<R>_{1,2,4}, and read the LMUL or the ratio from
the kind. VecKind grows to 6 bits.

This patch prepares to let riscv_rvv_vector_bits typedefs be shorter. It
does not change any behavior, except that the AST dump prints the LMUL
or the ratio.

Assisted-by: Claude
GitOrigin-RevId: a175e994979aefda89ef0fdd67b8f5b870674569
11 files changed
tree: 21a713c4992eff67a4b804db495ea58c0d946ada
  1. bindings/
  2. cmake/
  3. docs/
  4. examples/
  5. include/
  6. lib/
  7. runtime/
  8. test/
  9. tools/
  10. unittests/
  11. utils/
  12. www/
  13. .clang-format
  14. .clang-tidy
  15. .gitignore
  16. AreaTeamMembers.txt
  17. CMakeLists.txt
  18. INSTALL.txt
  19. LICENSE.TXT
  20. Maintainers.md
  21. NOTES.txt
  22. README.md
README.md

C language Family Front-end

Welcome to Clang.

This is a compiler front-end for the C family of languages (C, C++ and Objective-C) which is built as part of the LLVM compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things beyond just compiling code: we intend for Clang to be host to a number of different source-level tools. One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read the relevant websites. Here are some pointers: