summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2014-02-05 22:13:59 +0000
committerQuentin Colombet <qcolombet@apple.com>2014-02-05 22:13:59 +0000
commit1a10a514313c5b602361bb8ac4b8980675929f0b (patch)
tree8bbf07b779897214ef8c9855ae98c64e8e07ad96 /include/llvm
parent77b655c1c9b155441e34813223f172fa5a57891b (diff)
downloadllvm-1a10a514313c5b602361bb8ac4b8980675929f0b.tar.gz
llvm-1a10a514313c5b602361bb8ac4b8980675929f0b.tar.bz2
llvm-1a10a514313c5b602361bb8ac4b8980675929f0b.tar.xz
[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
Diffstat (limited to 'include/llvm')
0 files changed, 0 insertions, 0 deletions