public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* eh frame debug size improvement
@ 1997-10-15  2:33 Richard Henderson
  1997-10-15 20:16 ` Michael Meissner
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 1997-10-15  2:33 UTC (permalink / raw)
  To: egcs

With the following minimal patch, I get a 5 to 6 fold reduction in
.eh_frame on i686.  It is beginning to approach acceptible.

I have one idea to get things a bit smaller using only the tools
at hand: we need one CFA instruction to describe something akin
to m68k movem, in which a bit mask of registers is saved at 
consecutive locations.  The fact that x86 has no such insn is
irrelevant.  If the prologue is in one block (some relaxation of
the rule is possible), then we can consider all of the CFA insns
to occur at the same point.  This is important considering the
rather large penalty we incur with the current tools by moving
the CFA loc.

Judging from the sparc port, which does effectively this via its
window_save CFA op, we can potentially get another 2 fold reduction.

Unfortunately, the only way to get beyond this is adding smarts
to gnu ld to combine CIE's from across object files, and to recode
CFA instruction blocks now that the absolute distances are known.


r~

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

* Re: eh frame debug size improvement
  1997-10-15 20:16 ` Michael Meissner
@ 1997-10-15 20:16   ` Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 1997-10-15 20:16 UTC (permalink / raw)
  To: Michael Meissner; +Cc: egcs

On Wed, Oct 15, 1997 at 06:02:43PM -0400, Michael Meissner wrote:
> Note, if the comment is true, then an throwing an exception will wipe
> out all alloca'ed data, which IMHO is uncool.

No, if the epilogue can handle not caring where the stack pointer is,
as it surely must in a function using alloca, we can, as the comment
said, leave the stack pointer alone.

This will cause problems only with situations like

  while (1) {
    try {
      diediedie(barney);
    } catch (...) {
    }
  }

where we keep pushing parameters and not reclaiming. 

Note that if the function does not use alloca, we can reinit off the
frame pointer and the above does work.  Dynamicly sized arrays are
trickier, but we should still be able to reinit off the fp, since block
scope applies, and the save_expr's for the array sizes should still be
hanging out.


r~

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

* eh frame debug size improvement
  1997-10-15  2:33 eh frame debug size improvement Richard Henderson
@ 1997-10-15 20:16 ` Michael Meissner
  1997-10-15 20:16   ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Meissner @ 1997-10-15 20:16 UTC (permalink / raw)
  To: rth; +Cc: egcs

Richard Henderson writes:
| Wed Oct 15 02:09:44 1997  Richard Henderson  <rth@cygnus.com>
| 
| 	* dwarf2out.c (dwarf2out_stack_adjust): Skip if frame_pointer_needed.
| 
| Index: dwarf2out.c
| ===================================================================
| RCS file: /cvs/cvsfiles/egcs/gcc/dwarf2out.c,v
| retrieving revision 1.13
| diff -u -p -d -r1.13 dwarf2out.c
| --- dwarf2out.c	1997/10/07 21:35:54	1.13
| +++ dwarf2out.c	1997/10/15 09:00:27
| @@ -992,6 +992,14 @@ dwarf2out_stack_adjust (insn)
|    long offset;
|    char *label;
|  
| +  /* If this function uses a frame pointer, we know a-priori the frame
| +     size does not vary.  If we don't have EH regions, we can unwind
| +     the function with just the normal prologue info; if we do, we can
| +     either reinit the stack pointer off of the frame pointer, or leave
| +     it alone if EXIT_IGNORE_STACK.  */
| +  if (frame_pointer_needed)
| +    return;
| +
|    if (GET_CODE (insn) == BARRIER)
|      {
|        /* When we see a BARRIER, we know to reset args_size to 0.  Usually

Note, if the comment is true, then an throwing an exception will wipe
out all alloca'ed data, which IMHO is uncool.

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

end of thread, other threads:[~1997-10-15 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-15  2:33 eh frame debug size improvement Richard Henderson
1997-10-15 20:16 ` Michael Meissner
1997-10-15 20:16   ` Richard Henderson

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