From: Segher Boessenkool Date: Wed, 26 Jun 2019 12:16:40 +0000 (+0200) Subject: rs6000: Fix rs6000_keep_leaf_when_profiled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93a090cf2afdf3749c01bb55112c6e97cf38adc3;p=gcc.git rs6000: Fix rs6000_keep_leaf_when_profiled This function is called from elsewhere, so shouldn't be static. * config/rs6000/rs6000-internal.h (rs6000_keep_leaf_when_profiled): New declaration. * config/rs6000/rs6000-logue.c (rs6000_keep_leaf_when_profiled): Remove "static". * config/rs6000/rs6000.c (rs6000_keep_leaf_when_profiled): Delete declaration. --- gcc/config/rs6000/rs6000-internal.h | 1 + gcc/config/rs6000/rs6000-logue.c | 4 ++-- gcc/config/rs6000/rs6000.c | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/rs6000/rs6000-internal.h b/gcc/config/rs6000/rs6000-internal.h index a1acb66..22ebd37 100644 --- a/gcc/config/rs6000/rs6000-internal.h +++ b/gcc/config/rs6000/rs6000-internal.h @@ -99,6 +99,7 @@ extern bool save_reg_p (int reg); extern const char * rs6000_machine_from_flags (void); extern void emit_asm_machine (void); extern bool rs6000_global_entry_point_prologue_needed_p (void); +extern bool rs6000_keep_leaf_when_profiled (void); /* Return true if the OFFSET is valid for the quad address instructions that use d-form (register + offset) addressing. */ diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c index 9df4b5a..adc137b 100644 --- a/gcc/config/rs6000/rs6000-logue.c +++ b/gcc/config/rs6000/rs6000-logue.c @@ -4025,8 +4025,8 @@ rs6000_output_function_prologue (FILE *file) /* -mprofile-kernel code calls mcount before the function prolog, so a profiled leaf function should stay a leaf function. */ -static bool -rs6000_keep_leaf_when_profiled () +bool +rs6000_keep_leaf_when_profiled (void) { return TARGET_PROFILE_KERNEL; } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3fc4029..bcfc881 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1338,7 +1338,6 @@ static bool rs6000_secondary_reload_move (enum rs6000_reg_type, secondary_reload_info *, bool); rtl_opt_pass *make_pass_analyze_swaps (gcc::context*); -static bool rs6000_keep_leaf_when_profiled () __attribute__ ((unused)); static tree rs6000_fold_builtin (tree, int, tree *, bool); /* Hash table stuff for keeping track of TOC entries. */ -- 1.8.3.1 From-SVN: r272691 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c455011e1a..4abebb4c6b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,15 @@ 2019-06-26 Segher Boessenkool - * rs6000.c: Fix previous commit, it missed some changes. + * config/rs6000/rs6000-internal.h (rs6000_keep_leaf_when_profiled): New + declaration. + * config/rs6000/rs6000-logue.c (rs6000_keep_leaf_when_profiled): Remove + "static". + * config/rs6000/rs6000-logue.c (rs6000_keep_leaf_when_profiled): Delete + declaration. + +2019-06-26 Segher Boessenkool + + * config/rs6000/rs6000.c: Fix previous commit, it missed some changes. 2019-06-26 Richard Biener diff --git a/gcc/config/rs6000/rs6000-internal.h b/gcc/config/rs6000/rs6000-internal.h index a1acb663a0e..22ebd37bbfb 100644 --- a/gcc/config/rs6000/rs6000-internal.h +++ b/gcc/config/rs6000/rs6000-internal.h @@ -99,6 +99,7 @@ extern bool save_reg_p (int reg); extern const char * rs6000_machine_from_flags (void); extern void emit_asm_machine (void); extern bool rs6000_global_entry_point_prologue_needed_p (void); +extern bool rs6000_keep_leaf_when_profiled (void); /* Return true if the OFFSET is valid for the quad address instructions that use d-form (register + offset) addressing. */ diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c index 9df4b5aa6ad..adc137bdc6c 100644 --- a/gcc/config/rs6000/rs6000-logue.c +++ b/gcc/config/rs6000/rs6000-logue.c @@ -4025,8 +4025,8 @@ rs6000_output_function_prologue (FILE *file) /* -mprofile-kernel code calls mcount before the function prolog, so a profiled leaf function should stay a leaf function. */ -static bool -rs6000_keep_leaf_when_profiled () +bool +rs6000_keep_leaf_when_profiled (void) { return TARGET_PROFILE_KERNEL; } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3fc4029205a..bcfc881c62a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1338,7 +1338,6 @@ static bool rs6000_secondary_reload_move (enum rs6000_reg_type, secondary_reload_info *, bool); rtl_opt_pass *make_pass_analyze_swaps (gcc::context*); -static bool rs6000_keep_leaf_when_profiled () __attribute__ ((unused)); static tree rs6000_fold_builtin (tree, int, tree *, bool); /* Hash table stuff for keeping track of TOC entries. */