RE: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Li, Pan2 via Gcc-patches
Got it, will have a try. Pan From: juzhe.zh...@rivai.ai Sent: Tuesday, September 12, 2023 9:30 AM To: Li, Pan2 Cc: kito.cheng ; gcc-patches ; Wang, Yanzhang Subject: Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic Add a function call

Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread juzhe.zh...@rivai.ai
, Yanzhang Subject: RE: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic We cannot leverage this instance for correctness. The rfun of below code is the overloaded builtin is for the overloaded function, which is registered as void xxx(void) as aarch64 did to avoid the

RE: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Li, Pan2 via Gcc-patches
From: 钟居哲 Sent: Tuesday, September 12, 2023 7:20 AM To: Li, Pan2 Cc: kito.cheng ; gcc-patches ; Wang, Yanzhang Subject: Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic I don't understand. +tree +resolve_overloaded_builtin (location_t loc, unsigned int

Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread 钟居哲
-11 23:24 To: 钟居哲 CC: kito.cheng; gcc-patches; Wang, Yanzhang Subject: RE: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic For function instance with void or void arguments, it is easy as you mentioned as below. For generate API (to get the right hash), you need to bui

RE: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Li, Pan2 via Gcc-patches
: kito.cheng ; gcc-patches ; Wang, Yanzhang Subject: Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic function_instance get_read_vl_instance (void) { return function_instance ("read_vl", bases::read_vl, shapes::read_vl, none_ops[0], PRED

Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread 钟居哲
uzhe.zh...@rivai.ai From: Li, Pan2 Date: 2023-09-11 20:26 To: juzhe.zhong CC: kito.cheng; gcc-patches; Wang, Yanzhang Subject: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic > No. You must construct instance. 'strcmp' is very ugly. Strcmp here is defensive

RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Li, Pan2 via Gcc-patches
Li, Pan2 Cc: kito.cheng ; gcc-patches ; Wang, Yanzhang Subject: Re: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic No. You must construct instance. 'strcmp' is very ugly. Replied Message From Li, Pan2<mailto:pan2...@intel.com> Date 09/11/2023

RE: Re: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Li, Pan2 via Gcc-patches
are required by function_instance when constructing. Pan From: juzhe.zh...@rivai.ai Sent: Monday, September 11, 2023 5:13 PM To: kito.cheng Cc: Li, Pan2 ; gcc-patches ; Wang, Yanzhang Subject: Re: Re: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic >> Just m

Re: Re: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread juzhe.zh...@rivai.ai
ase, shape, mode, types, pred); registered_function *rfn = function_table->find_with_hash (instance, instance.hash ()); return rfn ? rfn->decl : NULL_TREE; } juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-09-11 17:04 To: juzhe.zh...@rivai.ai CC: pan2.li; gcc-patches; yanzhang.wang Subjec

Re: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Kito Cheng via Gcc-patches
> @@ -545,7 +563,7 @@ struct move_def : public build_base > /* According to rvv-intrinsic-doc, it does not add "_m" suffix > for vop_m C++ overloaded API. */ > -if (overloaded_p && instance.pred == PRED_TYPE_m) > +if (overloaded_p) Just make sure it's the right change? >

Re: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread juzhe.zh...@rivai.ai
Thanks for supporting it even though I don't like this feature :). The framework is LGTM. Let's wait for kito's more comments. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-11 15:57 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RI

[PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like add the framework to support the RVV overloaded intrinsic API in riscv-xxx-xxx-gcc, like riscv-xxx-xxx-g++ did. However, it almost leverage the hook TARGET_RESOLVE_OVERLOADED_BUILTIN with below steps. * Register overloaded functions. * Add function_resolver fo