diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-08-30 12:05:07 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-08-30 12:05:07 +0000 |
commit | 0cd039aad4ec41593206d0727ef1ca36226bebc6 (patch) | |
tree | 01af7f9b7ab538423497e97b82d35ef01e805d7b /gcc/config/s390/s390.c | |
parent | ca21ea5c9cd77b4bdd1cc3141e39ce1f083e08cc (diff) |
Backported from mainline
2019-02-18 Jakub Jelinek <jakub@redhat.com>
PR target/89361
* config/s390/s390.c (s390_indirect_branch_attrvalue,
s390_indirect_branch_settings): Define unconditionally.
(s390_set_current_function): Likewise, but guard the whole body except
the s390_indirect_branch_settings call with
#if S390_USE_TARGET_ATTRIBUTE.
(TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@275115 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390/s390.c')
-rw-r--r-- | gcc/config/s390/s390.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index f6b7dfc2bbe..0161ba03ff3 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -15498,6 +15498,7 @@ s390_valid_target_attribute_p (tree fndecl, } return ret; } +#endif /* Set VAL to correct enum value according to the indirect-branch or function-return attribute in ATTR. */ @@ -15572,6 +15573,7 @@ s390_indirect_branch_settings (tree fndecl) } +#if S390_USE_TARGET_ATTRIBUTE /* Restore targets globals from NEW_TREE and invalidate s390_previous_fndecl cache. */ @@ -15587,6 +15589,7 @@ s390_activate_target_options (tree new_tree) TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts (); s390_previous_fndecl = NULL_TREE; } +#endif /* Establish appropriate back-end context for processing the function FNDECL. The argument might be NULL to indicate processing at top @@ -15594,6 +15597,7 @@ s390_activate_target_options (tree new_tree) static void s390_set_current_function (tree fndecl) { +#if S390_USE_TARGET_ATTRIBUTE /* Only change the context if the function changes. This hook is called several times in the course of compiling a function, and we don't want to slow things down too much or call target_reinit when it isn't safe. */ @@ -15625,10 +15629,9 @@ s390_set_current_function (tree fndecl) if (old_tree != new_tree) s390_activate_target_options (new_tree); s390_previous_fndecl = fndecl; - +#endif s390_indirect_branch_settings (fndecl); } -#endif /* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P. */ @@ -16333,10 +16336,10 @@ s390_case_values_threshold (void) #undef TARGET_ASM_FILE_END #define TARGET_ASM_FILE_END s390_asm_file_end -#if S390_USE_TARGET_ATTRIBUTE #undef TARGET_SET_CURRENT_FUNCTION #define TARGET_SET_CURRENT_FUNCTION s390_set_current_function +#if S390_USE_TARGET_ATTRIBUTE #undef TARGET_OPTION_VALID_ATTRIBUTE_P #define TARGET_OPTION_VALID_ATTRIBUTE_P s390_valid_target_attribute_p #endif |