This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: find_mem_givs SMALL_REGISTER_CLASSES patch
- To: john at feith dot com (John Wehle)
- Subject: Re: find_mem_givs SMALL_REGISTER_CLASSES patch
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Sun, 28 Jun 98 23:06:44 +0200
- Cc: egcs-patches at cygnus dot com
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <199806281939.PAA24161@jwlab.FEITH.COM>
> I'm incline to believe that not recording a giv which is
> a valid address * is * the Right Thing to do on a register
> poor machine if the other option is to spill registers.
> Now if my other option is to record the giv and * not *
> spill (important) registers than that sounds like a better
> Right Thing.
Basically, your patch wouldn't do the right thing on my m68k [if it
defined SMALL_REGISTER_CLASSES] in most of the cases. The reason
for this is that on the m68k, complicated addressing modes are
expensive, and post-increment addressing is free.
So, if you decide not to mark (and hence reduce) a giv, this will
cost you dearly if there are enough registers (post-increment
addressing will be used), and if there aren't, you'll trade one
complicated and expensive addressing mode for storing and retrieving
a value (most probably to/from cache memory).
IOW - there's no obvious winner here.
HTH,
Toon.