Previously we used builtin_alias for overloaded intrinsics, but
macros for the non-overloaded version. This patch changes the
non-overloaded versions to also use builtin_alias, but without
the overloadable attribute.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
After preprocessing, macro definitions will disappear, but function declarations will not. This is the benefit of using macro.
After applying D112102, we could still use
#define vadd_vv_i8m1(op0, op1, op2) \ __builtin_rvv_vadd_vv((vint8m1_t)(op0), (vint8m1_t)(op1), (size_t)(op2))
Comment Actions
Sorry for the disturbing. After removing type string in the builtin definitions, we need a function declaration in the header. Macro doesn't work.
Comment Actions
I ran tests under clang/test/CodeGen/RISCV/rvv-intrinsics/. It spent a little more time to run the tests. (previous: 84.01s; apply this patch: 96.43s in my local environment.) We could apply some technic similar to D111617 to reduce the header size. I think to reduce the number of RVV builtins is important in the long run.