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
This commit is contained in:
Jakob Stoklund Olesen
2011-01-06 01:21:53 +00:00
parent 05e353c4ed
commit 8bfe50871f
5 changed files with 466 additions and 0 deletions

View File

@@ -80,6 +80,7 @@ add_llvm_library(LLVMCodeGen
SjLjEHPrepare.cpp
SlotIndexes.cpp
Spiller.cpp
SpillPlacement.cpp
SplitKit.cpp
Splitter.cpp
StackProtector.cpp