gcse basic block analysis optimizes EH return stub away (was: Re: Testsuite Results for gcc-2.96 19990628)

Jeffrey A Law law@cygnus.com
Sat Jul 31 22:30:00 GMT 1999


  In message < 19990701164736.A3850@cygnus.com >you write:
  > On Thu, Jul 01, 1999 at 03:16:02PM -0700, Mike Stump wrote:
  > > :-) Those instructions don't do what you think they do.  :-) I wonder
  > > if we can add a volatile asm, a memory barrier, or something to keep
  > > the optimizer from looking at it.
  > 
  > Actually, that wouldn't have helped.  The basic block was being
  > deleted because it was unreachable.
  > 
  > The expand_eh_return change below is the crucial one.  If we allow
  > the function to be inlined, we'll collect rtl then finally call
  > output_inline_function.  Which will call init_function_start, which
  > calls init_eh_for_function, which zeros eh_return_stub_label, which
  > disables all the magic in flow.
  > 
  > The other two changes are things I tried on the way to a correct
  > solution, but they seem like good ideas anyway.  The flow change
  > to not merge across EH edges can't happen often, but I suspect the
  > wrong thing would happen if it did.
  > 
  > 
  > r~
  > 
  > 
  > 
  > 	* except.c (expand_eh_return): Set current_function_cannot_inline.
  > 	(save_eh_status, restore_eh_status): Twiddle eh_return_stub_label.
  > 	* function.h (struct function): Add eh_return_stub_label.
  > 	* flow.c (delete_unreachable_blocks): Don't merge across EH edges.
I installed this after fixing the minor problems that were pointed out
(assignment to current_function_cannot_inline, intl.h include, dependency
update in Makefile.in).

jeff



More information about the Gcc-patches mailing list