Hi Yang-Yu: > > Specially, we can reproduce the result on BananaPi-F3 Hardware: > > Use this GCC branch with my patch: > https://github.com/cyyself/gcc/tree/rv_can_inline > > And compile the coremark on this branch: > https://github.com/cyyself/coremark/tree/rva22_v_hotspot > > With command `make CC=riscv64-unknown-linux-gnu-gcc compile` > > With my patch, we will get the coremark scored `Iterations/Sec : > 5992.917461`. But without this patch after `git reset HEAD^` and > recompile the GCC and then coremark, we will get `Iterations/Sec : > 5235.602094`, which is 12.6% slower.
Could you add a test case to demonstrate that ? > /* Callee's ISA should be a subset of the caller's ISA. */ This check is necessary, but this way may not scalable for longer term, I mean people may forgot to update this part when adding new extension variables, so I would suggest add a new function to construct a riscv_subset_list from options e.g. diff --git a/gcc/config/riscv/riscv-subset.h b/gcc/config/riscv/riscv-subset.h index dace4de6575..e8b7c0f194b 100644 --- a/gcc/config/riscv/riscv-subset.h +++ b/gcc/config/riscv/riscv-subset.h @@ -103,6 +103,7 @@ public: riscv_subset_list *clone () const; static riscv_subset_list *parse (const char *, location_t); + static riscv_subset_list *parse (struct gcc_options *opts); const char *parse_single_ext (const char *, bool exact_single_p = true); const riscv_subset_t *begin () const {return m_head;}; And then use riscv_subset_list to do the checking