IRA memory cost calculation

Jeff Law law@redhat.com
Mon Nov 30 22:00:00 GMT 2009


On 11/30/09 14:17, Michael Eager wrote:
> I've run into a situation where assign_hard_reg()
> decides that there are no registers available.
That can certainly happen.  It's also the case that assign_hard_reg may 
decide that memory is cheaper than a register and refuse to assign a 
register for certain allocnos.

> This
> results in a memory reference being substituted for a
> pseudo-register.  There's no check to see if the modified
> instruction is valid, which it isn't.
reload performs this action, not IRA.   Reload is allowed to replace a 
pseudo with its equivalent memory location, then emit whatever reloads 
are necessary to fix up the resulting insn.  So what you need to do is 
debug the generated reloads for the insn in question.

Often this kind of failure is a predicate, constraint or secondary 
reload problem.


Jeff



More information about the Gcc mailing list