> From the above doc, the major difference between a memory_constraint and a
> special_memory_constraint is:  whether "reload can or cannot make them match
> by reloading the address".

Right, i.e. by just changing the form of the address (instead of the address 
itself).

> For memory_constraint,  the reload is Okay, however, for
> special_memory_constraint, the reload is NOT Okay.
> 
> I am not sure whether the RELOAD includes Spill or not, if it is, then the
> current handling of special_memory_constraint is NOT correct:
> (lra-constraints.c)
> 
> 2088                     case CT_SPECIAL_MEMORY:
> 2089                       if (MEM_P (op)
> 2090                           && satisfies_memory_constraint_p (op, cn))
> 2091                         win = true;
> 2092                       else if (spilled_pseudo_p (op))
> 2093                         win = true;
> 2094                       break;
> 
> line 2092-2093 permits the memory spill, which seems need to be avoided for
> SPECIAL_MEMORY_Constraint.
> 
> the thing I need to confirm is:
> 
> whether “spill” is considered as RELOAD or NOT?

Yes, spilling is part of reloading but is not reloading the address since it's 
changing the address, so I think it's OK.  Why is that problematic for you?

-- 
Eric Botcazou

Reply via email to