OSDN Git Service

Add a RAGreedy::canEvict function.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 25 May 2011 23:58:36 +0000 (23:58 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 25 May 2011 23:58:36 +0000 (23:58 +0000)
commitb8d936bc179ddf31b6350015d74900b74db6b450
tree15cad4f40c5cb7b4785b4dcfd0ad79e5db1655ff
parent76927d7303046058c627691bd45d6bff608f49f4
Add a RAGreedy::canEvict function.

This doesn't change functionality (much), but it allows for a more fine-grained
eviction policy. The current policy only compares spill weights, and that is not
always the best thing to do.  Spill weights are designed to serve linear scan,
and they don't consider live range splitting.

Add a mechanism so canEvict() can request that a live range be evicted and
split/spilled. This is to avoid infinite eviction loops.

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