The new name better describes where it is used, and will be more suitable when subsequent commits make further changes to this function.
gcc/ChangeLog: * cgraph.h (create_version_clone_with_body): Rename parameter and change default value. * cgraphclones.cc: Rename parameter. * multiple_target.cc (create_target_clone): Update for inverted boolean parameter. diff --git a/gcc/cgraph.h b/gcc/cgraph.h index b4f028b3f3034056de1050ea1ab93a682197d0e1..16e2b2d045767206d5ccf12ee226f92ee10511d9 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1015,8 +1015,8 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node that will promote value of the attribute DECL_FUNCTION_SPECIFIC_TARGET of the declaration. - If VERSION_DECL is set true, use clone_function_name_numbered for the - function clone. Otherwise, use clone_function_name. + If TARGET_VERSION is set true, use clone_function_name to set new names. + Otherwise, use clone_function_name_numbered. Return the new version's cgraph node. */ cgraph_node *create_version_clone_with_body @@ -1024,7 +1024,7 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node vec<ipa_replace_map *, va_gc> *tree_map, ipa_param_adjustments *param_adjustments, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name, - tree target_attributes = NULL_TREE, bool version_decl = true); + tree target_attributes = NULL_TREE, bool target_version = false); /* Insert a new cgraph_function_version_info node into cgraph_fnver_htab corresponding to cgraph_node. */ diff --git a/gcc/cgraphclones.cc b/gcc/cgraphclones.cc index 6d7bc402a29161f473aaa34fb11b24264a7e8b7c..ab9a0fe7ccc5fcf9a0a03363c66016466d39427e 100644 --- a/gcc/cgraphclones.cc +++ b/gcc/cgraphclones.cc @@ -1013,7 +1013,7 @@ cgraph_node::create_version_clone_with_body vec<ipa_replace_map *, va_gc> *tree_map, ipa_param_adjustments *param_adjustments, bitmap bbs_to_copy, basic_block new_entry_block, const char *suffix, - tree target_attributes, bool version_decl) + tree target_attributes, bool target_version) { tree old_decl = decl; cgraph_node *new_version_node = NULL; @@ -1034,8 +1034,8 @@ cgraph_node::create_version_clone_with_body new_decl = copy_node (old_decl); /* Generate a new name for the new version. */ - tree fnname = (version_decl ? clone_function_name_numbered (old_decl, suffix) - : clone_function_name (old_decl, suffix)); + tree fnname = (target_version ? clone_function_name (old_decl, suffix) + : clone_function_name_numbered (old_decl, suffix)); DECL_NAME (new_decl) = fnname; SET_DECL_ASSEMBLER_NAME (new_decl, fnname); SET_DECL_RTL (new_decl, NULL); diff --git a/gcc/multiple_target.cc b/gcc/multiple_target.cc index 56a1934fe820e91b2fa451dcf6989382c906b98c..5fa13ee78035924e5dbd2aec1dd05192342c1a59 100644 --- a/gcc/multiple_target.cc +++ b/gcc/multiple_target.cc @@ -281,7 +281,7 @@ create_target_clone (cgraph_node *node, bool definition, char *name, { new_node = node->create_version_clone_with_body (vNULL, NULL, NULL, NULL, NULL, - name, attributes, false); + name, attributes, true); if (new_node == NULL) return NULL; new_node->force_output = true;