Add RAGreedy::calcCompactRegion.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 23 Jul 2011 03:41:57 +0000 (03:41 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 23 Jul 2011 03:41:57 +0000 (03:41 +0000)
commit87972fa63f0e2631778166e0c258c456ec12db7c
treec7ae4a84624ed9f6fc4b679fa2aa31d6dec4d1ee
parentfe9b2d142a0feb87b06579509479957f25d7d0a4
Add RAGreedy::calcCompactRegion.

This method computes the edge bundles that should be live when splitting
around a compact region. This is independent of interference.

The function returns false if the live range was already a compact
region, or the compact region doesn't have any live bundles - it would
be the same as splitting around basic blocks.

Compact regions are computed using the normal spill placement code. We
pretend there is interference in all live-through blocks that don't use
the live range. This removes all edges from the Hopfield network used
for spill placement, so it converges instantly.

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