From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: egcs@cygnus.com Subject: Re: Reload patch to improve 386 code Date: Tue, 19 Aug 1997 19:00:07 -0000 Message-id: <199708191800.TAA25100@phal.cygnus.co.uk> In-reply-to: Pine.SOL.3.90.970819095143.291G-100000@starsky.informatik.rwth-aachen.de X-SW-Source: 1997-08/0175.html > Then, there are some simplifications that could be done. I don't like the > inheritance code, find_equiv_reg and all that. IMHO reload shouldn't try to be > very clever about this sort of thing - the reload_cse_regs pass can be made > more clever. I've already submitted a patch to Kenner that enables > reload_cse_regs to generate optional reloads. If we could add some more > cleverness (e.g. deleting redundant stores into spill slots or eliminating > register-register copies), quite a bit of code in reload could be deleted. > I've already made some experiments in this direction which indicate that this > approach may be feasible. The problem with this is that you might have additional spills if you remove reload inherits - when you inherit a reload that needs a secondary reload, you extend the lifetime of only one reload register, instead of needing two (or more, when a tertiary reload would be needed too.) Moreover, if you remove reload inherits from / to memory, you might end up with code that looks like it could have an alias problem for doing cse on it, and reload_cse can't do anything. I actually think that the reload inheriting code should be mae smarter. I did some patches to do that and got more benefit for the code I tested than from reload_cse. However, they never got accepted for the FSF gcc... I'll re-fit them into egcs when I find some time for that. Should I sent them as multiple (conflicting) patches or as a single patch? The main issues are: - inheriting reloads from non-reload registers - emitting more complete REG_ notes when doing reloads, so that they can be found for inherits - being smarter about finding possible inherits > Another way of simplifying reload would be to try to generate auto-inc > addressing after reload has run, not before. That would eliminate some more > special-case code (and it might make other parts of the compiler simpler as > well). But then you wouldn't get the heuristics for the earlier passes right.