summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
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 /include/llvm/CodeGen
parent4bd828f78139b9bab561102c5b9c40133ad375ca (diff)
downloadllvm-9db3ea46cb7bd6bdf108d314daffd0dfd50a73fe.tar.gz
llvm-9db3ea46cb7bd6bdf108d314daffd0dfd50a73fe.tar.bz2
llvm-9db3ea46cb7bd6bdf108d314daffd0dfd50a73fe.tar.xz
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 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/CalcSpillWeights.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/CalcSpillWeights.h b/include/llvm/CodeGen/CalcSpillWeights.h
index a47d847739..240734fb2e 100644
--- a/include/llvm/CodeGen/CalcSpillWeights.h
+++ b/include/llvm/CodeGen/CalcSpillWeights.h
@@ -32,10 +32,10 @@ namespace llvm {
const MachineLoopInfo &loops) :
mf_(mf), lis_(lis), loops_(loops) {}
- /// CalculateRegClass - recompute the register class for li from its uses.
+ /// CalculateRegClass - recompute the register class for reg from its uses.
/// Since the register class can affect the allocation hint, this function
/// should be called before CalculateWeightAndHint if both are called.
- void CalculateRegClass(LiveInterval &li);
+ void CalculateRegClass(unsigned reg);
/// CalculateWeightAndHint - (re)compute li's spill weight and allocation
/// hint.