SMALL_REGISTER_CLASSES

Jeffrey A Law law@unknown
Tue Jan 20 18:39:00 GMT 1998


  In message < 199801202236.LAA14168@ongaonga.chch.cri.nz >you write:
  >  > CLASS_LIKELY_SPILLED_P which might be more useful to you.
  > 
  > Yeah, I'm using that as well to keep reload happy for another problem
  > class I have :-(
Yup.  

  >  > Right.  Any chance you could rework things so that reload doesn't have
  >  > to spill the register.  Or avoid mentioning those regs explicitly in RTL
  >  > (which we ended up doing on the PA for %r1 and %sar).
  > 
  > The class I'm having fun with has four registers, but they are all
  > either incoming function argument or function return registers.
Ouch.  Yup.  Either you need to find a way to never spill them, or you're
going to have to go down the SMALL_REGISTER_CLASSES route at some point.

  > So far I've managed to get away with not defining
  > SMALL_REGISTER_CLASSES and modifying order_regs_for_reload to not
  > include the explicitly mentioned registers in bad_spill_regs.
  > However, I imagine that I'll get shot in the foot one day....
Well, that's basically what SMALL_REGISTER_CLASSES does at some point
in reload -- it takes explicitly mentioned registers out of bad_spill_regs.

I suspect you will need to define SMALL_REGISTER_CLASSES at some point
though -- the way you're doing things now will end up causing trouble
at some point.

jeff



More information about the Gcc mailing list