OSDN Git Service

Use a new strategy for preventing eviction loops in RAGreedy.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 2 Jul 2011 01:37:09 +0000 (01:37 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 2 Jul 2011 01:37:09 +0000 (01:37 +0000)
commit1a988004dba412deb5d6b8e93b955dfc837065f0
tree1b86867cb96142999ffac195d5e31cf00ffe286e
parent2416b8962105078594d70cdd16cc6cb45b332e02
Use a new strategy for preventing eviction loops in RAGreedy.

Every live range is assigned a cascade number the first time it is
involved in an eviction. As the evictor, it gets a new cascade number.
Every evictee is assigned the same cascade number as the evictor.

Eviction is prohibited if the evictor has a lower assigned cascade
number than the evictee.

This means that assigned cascade numbers are monotonically increasing
with every eviction, yet they are bounded by NextCascade which can only
be incremented by new live ranges. Thus, infinite loops cannot happen,
but eviction cascades can still be triggered by new live ranges as we
want.

Thanks to Andy for explaining this to me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134303 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocGreedy.cpp