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
This commit is contained in:
Segher Boessenkool 2015-01-30 06:35:52 +01:00
parent 2e29434de9
commit dd1c1f8cb5
2 changed files with 26 additions and 5 deletions

View File

@ -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.

View File

@ -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. */