This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch to improve i386 epilogue (version 4)



  In message <199810080607.CAA13123@jwlab.FEITH.COM>you write:
  > [ This version uses life_analysis to determine if the function
  >   contains calls to other functions. ]
  > 
  > This change allows gcc to skip the loading of the stack pointer
  > when it is already known to contain the proper value.  This
  > optimization is currently only implemented for leaf functions.
  > 
  > ChangeLog:
  > 
  > Thu Oct  8 01:43:29 EDT 1998  John Wehle  (john@feith.com)
  > 
  > 	* flow.c: Update comment.
  > 	(life_analysis_1): Set current_function_has_no_calls.
  > 	* function.c: Define it.
  > 	(init_function_start): Initialize it.
  > 	* output.h: Declare it.
  > 	* i386.c (ix86_epilogue): Optimize the restoring
  > 	of the stack pointer for leaf functions.
This patch effectively makes the stack pointer live at the end of the last
block, but does not show it in the flow data.  This is bad.  I highly recommend
against it.

At this point I'm not sure about the best way to get this optimization.  I'm
tempted to lean towards suggesting someone fix gdb to grok leaf functions
without frame pointers, then allow the x86 port to do frame pointer elimination
for leaf functions.

jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]