On 5/29/25 6:46 AM, Alfie Richards wrote:
Renames record_function_versions to add_function_version, and make it
explicit that it is adding a single version to the function structure.

Additionally, change the insertion point to always maintain priority ordering
of the versions.

This allows for removing logic for moving the default to the first
position which was duplicated across target specific code and enables
easier reasoning about function sets.

gcc/ChangeLog:

    * cgraph.cc (cgraph_node::record_function_versions): Refactor and
    rename to...
    (cgraph_node::add_function_version): new function.
    * cgraph.h (cgraph_node::record_function_versions): Refactor and
    rename to...
    (cgraph_node::add_function_version): new function.
    * config/aarch64/aarch64.cc (aarch64_get_function_versions_dispatcher):
    Remove reordering.
    * config/i386/i386-features.cc (ix86_get_function_versions_dispatcher):
    Remove reordering.
    * config/riscv/riscv.cc (riscv_get_function_versions_dispatcher):
    Remove reordering.
    * config/rs6000/rs6000.cc (rs6000_get_function_versions_dispatcher):
    Remove reordering.

gcc/cp/ChangeLog:

    * decl.cc (maybe_version_functions): Change record_function_versions
    call to add_function_version.
OK.

It wouldn't be bad to go ahead and get this in since that will give us at least some testing independent of the rest of the kit.  But that's your call IMHO.

That's a great idea, I will reg test this on its own and commit it if that's all clean.

Thanks again,
Alfie


jeff


Reply via email to