aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-10 18:37:40 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-10 18:37:40 +0000
commit9db3ea46cb7bd6bdf108d314daffd0dfd50a73fe (patch)
tree25b453d1ffb5c1f030f21e5b000f4a4683d4e445 /lib/CodeGen/SplitKit.cpp
parent4bd828f78139b9bab561102c5b9c40133ad375ca (diff)
Implement register class inflation.
When splitting a live range, the new registers have fewer uses and the permissible register class may be less constrained. Recompute the register class constraint from the uses of new registers created for a split. This may let them be allocated from a larger set, possibly avoiding a spill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.cpp')
-rw-r--r--lib/CodeGen/SplitKit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index b7af73f627..ddd95e6adc 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/lib/CodeGen/SplitKit.cpp
@@ -571,6 +571,7 @@ void SplitEditor::rewrite() {
VirtRegAuxInfo vrai(vrm_.getMachineFunction(), lis_, sa_.loops_);
for (unsigned i = firstInterval, e = intervals_.size(); i != e; ++i) {
LiveInterval &li = *intervals_[i];
+ vrai.CalculateRegClass(li.reg);
vrai.CalculateWeightAndHint(li);
}
}