@verbatim
Coalesce spilled pseudos. Copyright (C) 2010-2013 Free Software Foundation, Inc. Contributed by Vladimir Makarov vmaka.nosp@m.rov@.nosp@m.redha.nosp@m.t.co.nosp@m.m.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
This file contains a pass making some simple RTL code
transformations by coalescing pseudos to remove some move insns.
Spilling pseudos in LRA can create memory-memory moves. We should
remove potential memory-memory moves before the next constraint
pass because the constraint pass will generate additional insns for
such moves and all these insns will be hard to remove afterwards.
Here we coalesce only spilled pseudos. Coalescing non-spilled
pseudos (with different hard regs) might result in spilling
additional pseudos because of possible conflicts with other
non-spilled pseudos and, as a consequence, in more constraint
passes and even LRA infinite cycling. Trivial the same hard
register moves will be removed by subsequent compiler passes.
We don't coalesce special reload pseudos. It complicates LRA code
a lot without visible generated code improvement.
The pseudo live-ranges are used to find conflicting pseudos during
coalescing.
Most frequently executed moves is tried to be coalesced first.
Arrays whose elements represent the first and the next pseudo
(regno) in the coalesced pseudos group to which given pseudo (its
regno is the index) belongs. The next of the last pseudo in the
group refers to the first pseudo in the group, in other words the
group is represented by a cyclic list.
Referenced by merge_pseudos().