2009/7/14 Paolo Bonzini <bonzini@xxxxxxx>:
> On 07/10/2009 03:14 PM, Peter Bergner wrote:
>> On Fri, 2009-07-10 at 00:58 +0200, Paolo Bonzini wrote:
>>> Note that it is already being done if reload_completed, just not if
>>> reload_in_progress. No matter how pleasant, it would be a surprise if
>>> the attached patch worked without this change it includes:
>>> - if (! constrain_operands (1))
>>> + if (! constrain_operands (reload_completed))
>>> (Note: I haven't tested it with the change, either). On the other hand,
>>> with the change there is a subtle difference in reload_as_needed now
>>> (I'm not sure it matters).
>>> Maxim, can you try it on m68k?
>> FYI, this bootstrapped and regtested with no errors on powerpc64-linux.
> [patch at http://permalink.gmane.org/gmane.comp.gcc.patches/189115]
> It also fixes the testcase. Ok for mainline and branches?
Sorry to butt in again, but like you say, I'm worried about changing
the contrain_operands argument from 1 to 0. The reload1.c code
that we've been talking about runs after the main reload processing,
so we shouldn't accept anything that doesn't strictly match its constraints.
We might also be pessimising things by changing the behaviour of
eliminate_regs_in_insn, although I haven't really thought about that much.
I know it's ugly, but how about either: (a) temporarily setting
reload_completed around the autoinc validate_change or
(b) adding a new interface to select what we want, with the
default being the same as now? E.g. (b) could take a callback
that does the validation, which would actually make the routines
a bit more flexible.
As penance for yakking so much, I'll do a patch for (b) if that