On 12-12-21 4:29 PM, David Miller wrote:
From: Vladimir Makarov <vmaka...@redhat.com>
Date: Fri, 21 Dec 2012 16:22:15 -0500
2012-12-21 Vladimir Makarov <vmaka...@redhat.com>
PR middle-end/55775
* lra-assigns.c (improve_inheritance): Do nothing after
LRA_MAX_INHERITANCE_PASSES pass.
* lra-constraints.c (MAX_CONSTRAINT_ITERATION_NUMBER): Rename to
LRA_MAX_CONSTRAINT_ITERATION_NUMBER. Move to lra-int.h.
(MAX_INHERITANCE_PASSES): Rename to LRA_MAX_INHERITANCE_PASSES.
Move to lra-int.h.
* lra-int.h (LRA_MAX_CONSTRAINT_ITERATION_NUMBER): Move from
lra-constraints.c.
(LRA_MAX_INHERITANCE_PASSES): Ditto.
The changes to lra_inheritabnce() and lra_undo_inheritance() are not
listed.
It is assumed, David. I should have written "rename everywhere".
Also, why is it OK to simply ignore the fact that a relaxation
algorithm is still making changes? Shouldn't we be instead fixing
whatever prevents proper convergence?
It is very hard to fix according to your proposals. It would require to
insert most of code from lra-constraints.c because code for improving
inheritance should take a lot of details about insn constraints into
account to fix it.
If I go this way, it will be another reload which is trying to do
everything at once. Also after 2 passes the inheritance improve code
(as inheritance code itself) usually does nothing for big majority of
programs. It has no sense to run them all the time. So for stability,
LRA after a few iterations is trying to do only most important and
necessary code for generation of the correct code.