[PATCH] D96843: [Clang][RISCV] Add vsetvl and vsetvlmax.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 15 13:48:45 PDT 2021


craig.topper added inline comments.


================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:164
+
+    // SEW
+    Builder.defineMacro("__rvv_e8", "0");
----------------
I'm not sure if it makes sense to expose these from the compiler. Should we define them in the header instead? They don't look useful without the header. Most of the defines from the compiler are expressing capabilities like what features are enabled so these seem different.


================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:169
+    Builder.defineMacro("__rvv_e64", "3");
+    Builder.defineMacro("__rvv_e128", "4");
+
----------------
Are intending to support e128?


================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:774
+  // Print header code
+  if (HeaderCode.size()) {
+    OS << HeaderCode;
----------------
!HeaderCode.empty()


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96843/new/

https://reviews.llvm.org/D96843



More information about the cfe-commits mailing list