Adding a new (target specific) builtins

Hi All,

I would like to add a new ‘_builtin’ (target-specific) in the clang frontend. Say for example __builtin_rvv_custom1 etc for the RISCV Vector backend.

At first I added the following lines in BuiltinsRISCVVector.def

#if defined(TARGET_BUILTIN) && !defined(RISCVV_BUILTIN)
#define RISCVV_BUILTIN(ID, TYPE, ATTRS) TARGET_BUILTIN(ID, TYPE, ATTRS, "zve32x|v")
#endif
RISCVV_BUILTIN(__builtin_rvv_cutom1,"", "n")
#undef RISCVV_BUILTIN

But I think it is not enough. For example, how do we specify the ResultType and OperandTypes?

I would like to avoid using Tablegen because I would like to test out my ideas on only a handful (maybe 2) of intrinsics before generalizing it for different types.

Thanks
Arka