aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-12 17:07:14 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-12 17:07:14 +0000
commitfcf88a19a27508bbc8a1017edccf25d39b3f4419 (patch)
tree0964880a5f446b5f926bd30ac2257ddd68b8ec98 /lib/CodeGen/InlineSpiller.cpp
parente7067d6174bd357dc175f47b34effdd2c0d72640 (diff)
downloadexternal_llvm-fcf88a19a27508bbc8a1017edccf25d39b3f4419.zip
external_llvm-fcf88a19a27508bbc8a1017edccf25d39b3f4419.tar.gz
external_llvm-fcf88a19a27508bbc8a1017edccf25d39b3f4419.tar.bz2
Implement single block splitting.
Before spilling a live range, we split it into a separate range for each basic block where it is used. That way we only get one reload per basic block if the new smaller ranges can allocate to a register. This type of splitting is already present in the standard spiller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--lib/CodeGen/InlineSpiller.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp
index 63a89aa..7978372 100644
--- a/lib/CodeGen/InlineSpiller.cpp
+++ b/lib/CodeGen/InlineSpiller.cpp
@@ -118,6 +118,15 @@ bool InlineSpiller::split() {
.splitAroundLoop(loop))
return true;
}
+
+ // Try splitting into single block intervals.
+ SplitAnalysis::BlockPtrSet blocks;
+ if (splitAnalysis_.getMultiUseBlocks(blocks)) {
+ if (SplitEditor(splitAnalysis_, lis_, vrm_, *newIntervals_)
+ .splitSingleBlocks(blocks))
+ return true;
+ }
+
return false;
}