diff options
author | Segher Boessenkool <segher@gcc.gnu.org> | 2015-01-30 06:35:52 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2015-01-30 06:35:52 +0100 |
commit | dd1c1f8cb5e4f405d2b6f693ef42b32e47f70b52 (patch) | |
tree | 029d27375e3b76ebd01e9bf8dcf5f538dabc6a5e /gcc | |
parent | 2e29434de909a71522122f18fc66efd40c23ce8b (diff) | |
download | gcc-dd1c1f8cb5e4f405d2b6f693ef42b32e47f70b52.zip gcc-dd1c1f8cb5e4f405d2b6f693ef42b32e47f70b52.tar.gz gcc-dd1c1f8cb5e4f405d2b6f693ef42b32e47f70b52.tar.bz2 |
re PR target/64580 (very high rs6000_stack_info() usage during LTO Firefox build on ppc64)
PR target/64580
* config.rs6000/rs6000.c (compute_vrsave_mask): Reverse loop order.
(rs6000_stack_info): Add assert.
(rs6000_output_savres_externs): New function, split off from...
(rs6000_output_function_prologue): ... here. Do not call it for
thunks.
From-SVN: r220272
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 20 |
2 files changed, 26 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0c02d43..a44ff5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,15 @@ +2015-01-29 Segher Boessenkool <segher@kernel.crashing.org> + + PR target/64580 + * config.rs6000/rs6000.c (compute_vrsave_mask): Reverse loop order. + (rs6000_stack_info): Add assert. + (rs6000_output_savres_externs): New function, split off from... + (rs6000_output_function_prologue): ... here. Do not call it for + thunks. + 2015-01-29 Jeff Law <law@redhat.com> - PR target/15184 + PR target/15184 * combine.c (try_combine): If I0 is a memory load and I3 a store to a related address, increase the "goodness" of doing a 4-insn combination with I0-I3. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 85eb0fd..40facd9 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -21145,7 +21145,7 @@ compute_vrsave_mask (void) them in again. More importantly, the mask we compute here is used to generate CLOBBERs in the set_vrsave insn, and we do not wish the argument registers to die. */ - for (i = crtl->args.info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG; --i) + for (i = ALTIVEC_ARG_MIN_REG; i < (unsigned) crtl->args.info.vregno; i++) mask &= ~ALTIVEC_REG_BIT (i); /* Similarly, remove the return value from the set. */ @@ -21554,6 +21554,9 @@ rs6000_savres_strategy (rs6000_stack_t *info, static rs6000_stack_t * rs6000_stack_info (void) { + /* We should never be called for thunks, we are not set up for that. */ + gcc_assert (!cfun->is_thunk); + rs6000_stack_t *info_ptr = &stack_info; int reg_size = TARGET_32BIT ? 4 : 8; int ehrd_size; @@ -24275,11 +24278,10 @@ rs6000_emit_prologue (void) } } -/* Write function prologue. */ +/* Output .extern statements for the save/restore routines we use. */ static void -rs6000_output_function_prologue (FILE *file, - HOST_WIDE_INT size ATTRIBUTE_UNUSED) +rs6000_output_savres_externs (FILE *file) { rs6000_stack_t *info = rs6000_stack_info (); @@ -24311,6 +24313,16 @@ rs6000_output_function_prologue (FILE *file, fprintf (file, "\t.extern %s\n", name); } } +} + +/* Write function prologue. */ + +static void +rs6000_output_function_prologue (FILE *file, + HOST_WIDE_INT size ATTRIBUTE_UNUSED) +{ + if (!cfun->is_thunk) + rs6000_output_savres_externs (file); /* ELFv2 ABI r2 setup code and local entry point. This must follow immediately after the global entry point label. */ |