> > This will make the target attribute able to accept 'priority' as well?
>
> Yes, but it doesn't have any effect since the only consumer of the
> 'priority' is sorting each versioned function when generating the
> IFUNC resolver.

Yeah, but I would prefer to follow the spec as possible here, that
could prevent accepting unexpected stuff to cause some unnecessary
incompatible behavior among different compilers.

>
> > so I guess we need to make riscv_target_attr_parser able to
> > distinguish target and target_version? maybe add an extra argument to
> > riscv_target_attr_parser?
>
> I think so if it really needed.
>
> >
> > On Thu, Oct 24, 2024 at 3:12 PM Yangyu Chen <c...@cyyself.name> wrote:
> >>
> >> 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
> >>
> >> 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.
> >>        (riscv_process_one_target_attr): Add const qualifier to arg_str
> >>        and split arg_str with ';'.
> >>        * config/riscv/riscv.opt: Add TargetVariable riscv_fmv_priority.
> >> ---
>

Reply via email to