> The OPTION is there because this was introduced for the option > attribute. But the entry in the target structure is named > can_inline_p, and the macro should be TARGET_CAN_INLINE_P. So the > doc is the desired state, and the code is not.
How's this? * targhooks.c (default_target_can_inline_p): Rename from default_target_option_can_inline_p. * targhooks.h (default_target_can_inline_p): Likewise. * target-def.h (TARGET_CAN_INLINE_P): Rename from TARGET_OPTION_CAN_INLINE_P. * config/i386/i386.c (TARGET_CAN_INLINE_P): Likewise. * config/mep/mep.c (TARGET_CAN_INLINE_P): Likewise. (mep_target_can_inline_p): Rename from mep_target_option_can_inline_p. Index: targhooks.c =================================================================== --- targhooks.c (revision 149452) +++ targhooks.c (working copy) @@ -768,13 +768,13 @@ default_target_option_pragma_parse (tree "#pragma GCC target is not supported for this machine"); return false; } bool -default_target_option_can_inline_p (tree caller, tree callee) +default_target_can_inline_p (tree caller, tree callee) { bool ret = false; tree callee_opts = DECL_FUNCTION_SPECIFIC_TARGET (callee); tree caller_opts = DECL_FUNCTION_SPECIFIC_TARGET (caller); /* If callee has no option attributes, then it is ok to inline */ Index: targhooks.h =================================================================== --- targhooks.h (revision 149452) +++ targhooks.h (working copy) @@ -104,8 +104,8 @@ extern int default_reloc_rw_mask (void); extern tree default_mangle_decl_assembler_name (tree, tree); extern tree default_emutls_var_fields (tree, tree *); extern tree default_emutls_var_init (tree, tree, tree); extern bool default_hard_regno_scratch_ok (unsigned int); extern bool default_target_option_valid_attribute_p (tree, tree, tree, int); extern bool default_target_option_pragma_parse (tree, tree); -extern bool default_target_option_can_inline_p (tree, tree); +extern bool default_target_can_inline_p (tree, tree); extern unsigned int default_case_values_threshold (void); Index: target-def.h =================================================================== --- target-def.h (revision 149452) +++ target-def.h (working copy) @@ -824,24 +824,24 @@ #endif #ifndef TARGET_OPTION_PRAGMA_PARSE #define TARGET_OPTION_PRAGMA_PARSE default_target_option_pragma_parse #endif -#ifndef TARGET_OPTION_CAN_INLINE_P -#define TARGET_OPTION_CAN_INLINE_P default_target_option_can_inline_p +#ifndef TARGET_CAN_INLINE_P +#define TARGET_CAN_INLINE_P default_target_can_inline_p #endif #define TARGET_OPTION_HOOKS \ { \ TARGET_OPTION_VALID_ATTRIBUTE_P, \ TARGET_OPTION_SAVE, \ TARGET_OPTION_RESTORE, \ TARGET_OPTION_PRINT, \ TARGET_OPTION_PRAGMA_PARSE, \ - TARGET_OPTION_CAN_INLINE_P, \ + TARGET_CAN_INLINE_P, \ } /* The whole shebang. */ #define TARGET_INITIALIZER \ { \ TARGET_ASM_OUT, \ Index: config/mep/mep.c =================================================================== --- config/mep/mep.c (revision 149453) +++ config/mep/mep.c (working copy) @@ -167,13 +167,13 @@ static tree mep_validate_based_tiny (tre static tree mep_validate_near_far (tree *, tree, tree, int, bool *); static tree mep_validate_disinterrupt (tree *, tree, tree, int, bool *); static tree mep_validate_interrupt (tree *, tree, tree, int, bool *); static tree mep_validate_io_cb (tree *, tree, tree, int, bool *); static tree mep_validate_vliw (tree *, tree, tree, int, bool *); static bool mep_function_attribute_inlinable_p (const_tree); -static bool mep_option_can_inline_p (tree, tree); +static bool mep_can_inline_p (tree, tree); static bool mep_lookup_pragma_disinterrupt (const char *); static int mep_multiple_address_regions (tree, bool); static int mep_attrlist_to_encoding (tree, tree); static void mep_insert_attributes (tree, tree *); static void mep_encode_section_info (tree, rtx, int); static section * mep_select_section (tree, int, unsigned HOST_WIDE_INT); @@ -233,14 +233,14 @@ static tree mep_gimplify_va_arg_expr (tr #undef TARGET_COMP_TYPE_ATTRIBUTES #define TARGET_COMP_TYPE_ATTRIBUTES mep_comp_type_attributes #undef TARGET_INSERT_ATTRIBUTES #define TARGET_INSERT_ATTRIBUTES mep_insert_attributes #undef TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P #define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P mep_function_attribute_inlinable_p -#undef TARGET_OPTION_CAN_INLINE_P -#define TARGET_OPTION_CAN_INLINE_P mep_option_can_inline_p +#undef TARGET_CAN_INLINE_P +#define TARGET_CAN_INLINE_P mep_can_inline_p #undef TARGET_SECTION_TYPE_FLAGS #define TARGET_SECTION_TYPE_FLAGS mep_section_type_flags #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION mep_asm_named_section #undef TARGET_INIT_BUILTINS #define TARGET_INIT_BUILTINS mep_init_builtins @@ -4107,13 +4107,13 @@ mep_function_attribute_inlinable_p (cons if (!attrs) attrs = DECL_ATTRIBUTES (callee); return (lookup_attribute ("disinterrupt", attrs) == 0 && lookup_attribute ("interrupt", attrs) == 0); } static bool -mep_option_can_inline_p (tree caller, tree callee) +mep_can_inline_p (tree caller, tree callee) { if (TREE_CODE (callee) == ADDR_EXPR) callee = TREE_OPERAND (callee, 0); if (TREE_CODE (callee) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (callee) Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 149452) +++ config/i386/i386.c (working copy) @@ -30586,14 +30586,14 @@ ix86_enum_va_list (int idx, const char * #undef TARGET_OPTION_RESTORE #define TARGET_OPTION_RESTORE ix86_function_specific_restore #undef TARGET_OPTION_PRINT #define TARGET_OPTION_PRINT ix86_function_specific_print -#undef TARGET_OPTION_CAN_INLINE_P -#define TARGET_OPTION_CAN_INLINE_P ix86_can_inline_p +#undef TARGET_CAN_INLINE_P +#define TARGET_CAN_INLINE_P ix86_can_inline_p #undef TARGET_EXPAND_TO_RTL_HOOK #define TARGET_EXPAND_TO_RTL_HOOK ix86_maybe_switch_abi #undef TARGET_LEGITIMATE_ADDRESS_P #define TARGET_LEGITIMATE_ADDRESS_P ix86_legitimate_address_p