Hi,
this patch skips the redundant re-computing of the frame info after reload
completed.
I looked at all available targets initial_elimination_offset functions:
All of them currently use either a trivial function of
crtl->outgoing_args_size, get_frame_size ()
and df_regs_ever_live_p (x), that can be expected to be evaluated quickly and
to be constant,
or they use a cached value, if they are called when reload_completed is true.
I believe this patch will both be a performance optimization and guarantee that
the frame info
can not unexpectedly change when it should not.
I have successfully built a cross-compiler with this patch.
Is it OK for trunk?
Thanks
Bernd.
2016-01-23 Bernd Edlinger <bernd.edlin...@hotmail.de>
* config/mips/mips.c (mips_compute_frame_info): Skip re-computing
the frame info after reload completed.
Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c (revision 231954)
+++ gcc/config/mips/mips.c (working copy)
@@ -10321,6 +10321,10 @@ mips_compute_frame_info (void)
HOST_WIDE_INT offset, size;
unsigned int regno, i;
+ /* Skip re-computing the frame info after reload completed. */
+ if (reload_completed)
+ return;
+
/* Set this function's interrupt properties. */
if (mips_interrupt_type_p (TREE_TYPE (current_function_decl)))
{