llvm-6502/lib
Quentin Colombet 1a10a51431 [RegAlloc] Add a last chance recoloring mechanism when everything else failed to
find a register.

The idea is to choose a color for the variable that cannot be allocated and
recolor its interferences around. Unlike the current register allocation scheme,
it is allowed to change the color of an already assigned (but maybe not
splittable or spillable) live interval while propagating this change to its
neighbors.
In other word, there are two things that may help finding an available color:
- Already assigned variables (RS_Done) can be recolored to different color.
- The recoloring allows to catch solutions that needs to touch more that just
  the neighbors of the current allocated variable.

E.g.,
vA can use {R1, R2    }
vB can use {    R2, R3}
vC can use {R1        }
Where vA, vB, and vC cannot be split anymore (they are reloads for instance) and
they all interfere.

vA is assigned R1
vB is assigned R2
vC tries to evict vA but vA is already done.
=> Regular register allocation heuristic fails.

Last chance recoloring kicks in:
vC does as if vA was evicted => vC uses R1.
vC is marked as fixed.
vA needs to find a color.
None are available.
vA cannot evict vC: vC is a fixed virtual register now.
vA does as if vB was evicted => vA uses R2.
vB needs to find a color.
R3 is available.
Recoloring => vC = R1, vA = R2, vB = R3.

<rdar://problem/15947839>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200883 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 22:13:59 +00:00
..
Analysis cleanup: scc_iterator consumers should use isAtEnd 2014-02-04 19:19:07 +00:00
AsmParser [ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret' 2014-01-31 17:41:22 +00:00
Bitcode Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
CodeGen [RegAlloc] Add a last chance recoloring mechanism when everything else failed to 2014-02-05 22:13:59 +00:00
DebugInfo Simplify the handling of iterators in ObjectFile. 2014-01-30 02:49:50 +00:00
ExecutionEngine Simplify getSymbolFlags. 2014-01-31 20:57:12 +00:00
IR [PM] Don't require analysis results to be const in the new pass manager. 2014-02-05 21:41:42 +00:00
IRReader Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
LineEditor Avoid using EL_GETFP. 2014-02-04 20:04:46 +00:00
Linker Reapply r194218 with fix: 2014-01-16 06:29:36 +00:00
LTO Change MCStreamer EmitInstruction interface to take subtarget info 2014-01-28 23:12:42 +00:00
MC Remove support for not using .loc directives. 2014-02-05 18:00:21 +00:00
Object Use the information provided by getFlags to unify some code in llvm-nm. 2014-02-05 05:19:19 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
Support Revert "Fix an invalid check for duplicate option categories." 2014-02-05 17:49:31 +00:00
TableGen [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses 2014-01-02 20:47:09 +00:00
Target Remove support for not using .loc directives. 2014-02-05 18:00:21 +00:00
Transforms SimplifyLibCalls: Push TLI through the exp2->ldexp transform. 2014-02-04 20:27:23 +00:00
CMakeLists.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
LLVMBuild.txt Introduce line editor library. 2014-01-31 23:46:14 +00:00
Makefile Introduce line editor library. 2014-01-31 23:46:14 +00:00