public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Skip re-computing the mips frame info after reload completed
@ 2016-01-23 13:25 Bernd Edlinger
  2016-01-24 21:57 ` Matthew Fortune
  0 siblings, 1 reply; 19+ messages in thread
From: Bernd Edlinger @ 2016-01-23 13:25 UTC (permalink / raw)
  To: Matthew Fortune; +Cc: gcc-patches, Nick Clifton

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-mips.diff --]
[-- Type: text/x-patch; name="patch-mips.diff", Size: 697 bytes --]

2016-01-23  Bernd Edlinger  <bernd.edlinger@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)))
     {

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-02-01 13:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 13:25 [PATCH] Skip re-computing the mips frame info after reload completed Bernd Edlinger
2016-01-24 21:57 ` Matthew Fortune
2016-01-25  7:44   ` AW: " Bernd Edlinger
2016-01-25 19:57     ` Matthew Fortune
2016-01-26 21:18       ` Is it OK for rtx_addr_can_trap_p_1 to attempt to compute the frame layout? (was Re: [PATCH] Skip re-computing the mips frame info after reload completed) Richard Sandiford
2016-01-27 21:09         ` Bernd Edlinger
2016-01-28 22:17           ` Richard Sandiford
2016-01-29 17:54             ` Bernd Edlinger
2016-01-27 23:36         ` Eric Botcazou
2016-01-29  1:09           ` Bernd Schmidt
2016-01-29 15:18             ` Bernd Edlinger
2016-01-29 15:41             ` Jakub Jelinek
2016-01-29 15:47               ` Bernd Schmidt
2016-01-29 19:42                 ` Bernd Edlinger
2016-02-01 12:18                   ` Bernd Schmidt
2016-02-01 12:49                     ` Richard Biener
2016-02-01 12:51                       ` Bernd Schmidt
2016-02-01 13:10                         ` Richard Biener
2016-02-01 13:19                     ` AW: " Bernd Edlinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).