On 12/02/2011 08:35 AM, Hans-Peter Nilsson wrote:
On Tue, 29 Nov 2011, Vladimir Makarov wrote:
3. The patch rewrite the way of dealing with the secondary memory
    moves in constraint pass of LRA.  Previously we generated secondary
    moves if macro SECONDARY_MEMORY_NEEDED says so.  Unfortunately, the
    macro is usually defined inaccurately.
I do not doubt that, but I think it would help if you mentioned
what you see that is wrong, in particular if it's consistent
among targets.

The last testsuite degradations solved for x86-64 were about moving between xmm and and general regs. SECONDARY_MEMORY_NEEDED returned NO_REGS. The code for this macro should be expanded a lot to be accurate (too many elements in a set CLASSxCLASSxMODE). Currently, mode is ignored and not any mode moves between xmm and general regs are permitted. The right source of this info are insn constraints. So instead of expanding code for the macro, I decided to use constraints info first.
For example, for MIPS (and I'd probably for other targets too if
I looked) for an older gcc, I've seen calls with class ==
NO_REGS to the related function mips_secondary_reload_class due
to MEMORY_MOVE_COST applied to a constant, which becomes a bit
of a problem if it's used as-is as a first argument to
reg_class_subset_p (the empty class being a subset of every
class).

brgds, H-P

Reply via email to