Commit dd1c1f8c by Segher Boessenkool

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
parent 2e29434d
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> 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 * 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 to a related address, increase the "goodness" of doing a 4-insn
combination with I0-I3. combination with I0-I3.
......
...@@ -21145,7 +21145,7 @@ compute_vrsave_mask (void) ...@@ -21145,7 +21145,7 @@ compute_vrsave_mask (void)
them in again. More importantly, the mask we compute here is them in again. More importantly, the mask we compute here is
used to generate CLOBBERs in the set_vrsave insn, and we do not used to generate CLOBBERs in the set_vrsave insn, and we do not
wish the argument registers to die. */ 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); mask &= ~ALTIVEC_REG_BIT (i);
/* Similarly, remove the return value from the set. */ /* Similarly, remove the return value from the set. */
...@@ -21554,6 +21554,9 @@ rs6000_savres_strategy (rs6000_stack_t *info, ...@@ -21554,6 +21554,9 @@ rs6000_savres_strategy (rs6000_stack_t *info,
static rs6000_stack_t * static rs6000_stack_t *
rs6000_stack_info (void) 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; rs6000_stack_t *info_ptr = &stack_info;
int reg_size = TARGET_32BIT ? 4 : 8; int reg_size = TARGET_32BIT ? 4 : 8;
int ehrd_size; int ehrd_size;
...@@ -24275,11 +24278,10 @@ rs6000_emit_prologue (void) ...@@ -24275,11 +24278,10 @@ rs6000_emit_prologue (void)
} }
} }
/* Write function prologue. */ /* Output .extern statements for the save/restore routines we use. */
static void static void
rs6000_output_function_prologue (FILE *file, rs6000_output_savres_externs (FILE *file)
HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{ {
rs6000_stack_t *info = rs6000_stack_info (); rs6000_stack_t *info = rs6000_stack_info ();
...@@ -24311,6 +24313,16 @@ rs6000_output_function_prologue (FILE *file, ...@@ -24311,6 +24313,16 @@ rs6000_output_function_prologue (FILE *file,
fprintf (file, "\t.extern %s\n", name); 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 /* ELFv2 ABI r2 setup code and local entry point. This must follow
immediately after the global entry point label. */ immediately after the global entry point label. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment