Problem in inheritance code

Jeffrey A Law law@cygnus.com
Fri Oct 16 01:07:00 GMT 1998


  In message <Pine.GSO.4.02A.9810151202190.7569-100000@holmes.informatik.rwth-a
achen.de>you write:
  > Yesterday I tested my local spill patches together with Joern Rennecke's
  > inheritance patches which I grabbed off egcs-patches. 
Thanks!  This is one of the things on my todo list -- make sure the two mega
patches play well together.  Even more so now that Joern has left for 3weeks
of vacation :-)

The good news about Joern's work is I basically think it's done.   Jim and I
have been reviewing and in some cases testing Joern's work throughout the
development process (this work actually started about 6 months ago).

We've also been extracting out independent improvements and bugfixes along the
way, much like we've been doing for your changes :-)


  > Doing this revealed
  > a bug in the reload inheritance code: it uses (spill_reg_order[r] < 0) as
  > a test whether hard register R is not allocated to a pseudo.
Ouch.

  > That can be
  > incorrect with the current code due to block-local pseudos which weren't
  > spilled, and it will definitely be incorrect with the local spill patches,
  > unless they are modified to recompute spill_reg_order for every insn.
Ugh.

  > The
  > patch below seems like a good solution.  It relies on the life information
  > being correct and up-to-date in the reload_insn_chain, which should be given
  > by now.
Agreed.

  > There are some other places in choose_reload_regs/allocate_reload_reg which
  > make the same assumption.  I'm wondering whether any of those could be
  > incorrect as well.
I suspect some are.  Though a brief glance at the existing uses tend to make
me think it's more used to try and prefer using an existing spill reg over
getting a new one (see the routines to find groups for example).  That may or
may not be a reasonable heuristic once the localized spilling code is in place.


  > Jeff, what are you planning to do next in the reload pass?  If you want to
  > integrate Joern's patch first, I'll wait a bit with sending the final piece
  > of my changes; otherwise you'll get a patch from me tomorrow.
I'm leaning towards getting Joern's patch in first.  It has fewer unknowns
for performance issues.  That's largely because it is much less ambitious than
your patch.

I do have the goal of having both in a local tree this weekend  (even if not
committed) so that I can poke at them and lay to rest the performance concerns
some folks have expressed with the local spilling code.

Personally I suspect any localized lossage due to your patch will be dwarfed by
the global improvements we get from not kicking out all pseudos allocated to a
hard reg we used as a spill reg.  I need to be able to put #s by that
speculation to close the issue once and for all.


So, definitely send your last patch for the local spilling code.  If you've got
diffs which apply both your patch and Joern's, you might send those to the
list too.  If you don't have the combined patch, don't worry about it.


jeff



More information about the Gcc-patches mailing list