On 12/20/23 05:25, Jun Sha (Joshua) wrote:
This patch moves the definition of the enums lst_type and
frm_op_type into riscv-vector-builtins-bases.h and removes
the static visibility of fold_fault_load(), so these
can be used in other compile units.
gcc/ChangeLog:
* config/riscv/riscv-vector-builtins-bases.cc (enum lst_type):
(enum frm_op_type): move to riscv-vector-builtins-bases.h
* config/riscv/riscv-vector-builtins-bases.h
(GCC_RISCV_VECTOR_BUILTINS_BASES_H): Add header files.
(enum lst_type): move from
(enum frm_op_type): riscv-vector-builtins-bases.cc
(fold_fault_load): riscv-vector-builtins-bases.cc
I'm largely hoping to leave the heavy review lifting here to Juzhe who
knows GCC's RV vector bits as well as anyone.
Just one small issue. Would it be better to prototype fold_fault_load
elsewhere and avoid the gimple.h inclusion in
riscv-vector-builtins-bases.h? Perhaps riscv-protos.h?
You might consider prefixing the function name with riscv_. It's not
strictly necessary, but it appears to be relatively common in risc-v port.
Thanks,
Jeff