Georg-Johann Lay wrote:

> Thanks, it works.

OK, thanks for testing!

>       std Y+2,r31      ;  30  *movphi/3       [length = 7]
>       std Y+1,r30

I'm actually not seeing those (maybe I'm using a different code
base than you were using ...)

But I still see that the frame is created.  The problem is that IRA
thinks it needs to allocate a pseudo on the stack, and creates a
stack slot for it.  But then reload goes and just reloads the
pseudo into a hard register anyway, and simply doesn't need the
stack slot ... but it was already allocated and accounted for
such that get_frame_size () no longer returns 0.

> I frequently see IRA doing a very bad job for small register classes
> like here.  Maybe it's better to take it completely away from IRA
> and write the load as
> 
> (set (reg:HI)
>      (unspec:HI (post_inc:PHI (reg:PHI Z))))
> 
> Loading from __pgm is actually an unspec, i.e. reading two times from
> the same address will yield the same result.

This really seems to be a problem in IRA somewhere, but I'd guess it
would be better to fix in there instead of working around it.  Maybe
you should open a bug an get in touch with the IRA maintainers ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  ulrich.weig...@de.ibm.com

Reply via email to