Add the SpillPlacement analysis pass.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 6 Jan 2011 01:21:53 +0000 (01:21 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 6 Jan 2011 01:21:53 +0000 (01:21 +0000)
commit8bfe50871f9cb1b022483e0e1307ab5b8c9e5650
tree7592b8d248dae5cc9576b9d7a315230bccffd99d
parent05e353c4eda22c99967453029dfa7de276409951
Add the SpillPlacement analysis pass.

This pass precomputes CFG block frequency information that can be used by the
register allocator to find optimal spill code placement.

Given an interference pattern, placeSpills() will compute which basic blocks
should have the current variable enter or exit in a register, and which blocks
prefer the stack.

The algorithm is ready to consume block frequencies from profiling data, but for
now it gets by with the static estimates used for spill weights.

This is a work in progress and still not hooked up to RegAllocGreedy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122938 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/Passes.h
include/llvm/InitializePasses.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/SpillPlacement.cpp [new file with mode: 0644]
lib/CodeGen/SpillPlacement.h [new file with mode: 0644]