This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: find_mem_givs SMALL_REGISTER_CLASSES patch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]