]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Implement Priority syntax parser for Function Multi-Versioning
authorYangyu Chen <cyy@cyyself.name>
Tue, 5 Nov 2024 03:22:00 +0000 (11:22 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Wed, 13 Nov 2024 09:01:42 +0000 (17:01 +0800)
commit6b572d4eecc99c4a014ce1eab5e79976e30f4d9f
treefd57b5ad1e75d0e5bbf1546c3f5bce55d69601f7
parent9bf0dbe67244fffc5cb939e51ead2876557c8c37
RISC-V: Implement Priority syntax parser for Function Multi-Versioning

This patch adds the priority syntax parser to support the Function
Multi-Versioning (FMV) feature in RISC-V. This feature allows users to
specify the priority of the function version in the attribute syntax.

Chnages based on RISC-V C-API PR:
https://github.com/riscv-non-isa/riscv-c-api-doc/pull/85

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
gcc/ChangeLog:

* config/riscv/riscv-target-attr.cc
(riscv_target_attr_parser::handle_priority): New function.
(riscv_target_attr_parser::update_settings): Update priority
attribute.
* config/riscv/riscv.opt: Add TargetVariable riscv_fmv_priority.
gcc/config/riscv/riscv-target-attr.cc
gcc/config/riscv/riscv.opt