aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2019-06-26 14:16:40 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2019-06-26 14:16:40 +0200
commit93a090cf2afdf3749c01bb55112c6e97cf38adc3 (patch)
tree186d24c6df0600c8af78365f4c4d49eb5f497c36
parente2e8d27426e0702c5ccaf77426de7430fcddb62c (diff)
downloadgcc-93a090cf2afdf3749c01bb55112c6e97cf38adc3.zip
gcc-93a090cf2afdf3749c01bb55112c6e97cf38adc3.tar.gz
gcc-93a090cf2afdf3749c01bb55112c6e97cf38adc3.tar.bz2
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
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/rs6000/rs6000-internal.h1
-rw-r--r--gcc/config/rs6000/rs6000-logue.c4
-rw-r--r--gcc/config/rs6000/rs6000.c1
4 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2c45501..4abebb4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,15 @@
2019-06-26 Segher Boessenkool <segher@kernel.crashing.org>
- * 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 <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.c: Fix previous commit, it missed some changes.
2019-06-26 Richard Biener <rguenther@suse.de>
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. */