On 10/29/2015 12:40 PM, Segher Boessenkool wrote:
LRA wants to replace SCRATCH registers with real registers. It should
not do that with (mem:BLK (scratch)), which is special, not really a
scratch register.
I don't know if this patch handles this in the best place to handle it;
I don't even know if it is really correct. It does solve the rs6000
bootstrap problems with LRA enabled by default (it ICEd building libitm),
with no apparent ill effects.
Segher, thanks for working on this issue.
LRA removes scratches temporary and restore them but only for insn
operands. This is done to get a better allocation results as scratch
might need a register and this should be taken in to account by other
pseudos allocations. The mentioned construction is used for different
purposes and was missed from the LRA consideration.
The patch is perfectly fine and fixes the problem in the right place.
So please go ahead and commit this patch into the trunk.