summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveInterval.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-03 00:54:23 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-03 00:54:23 +0000
commit2cd21119593becfa1962cfaca0319fd67913f545 (patch)
tree1e012e68f87b842b624ad4d12d0a14cf3151c7c2 /include/llvm/CodeGen/LiveInterval.h
parent37280785092424431a714fa04981045a8fff3818 (diff)
downloadllvm-2cd21119593becfa1962cfaca0319fd67913f545.tar.gz
llvm-2cd21119593becfa1962cfaca0319fd67913f545.tar.bz2
llvm-2cd21119593becfa1962cfaca0319fd67913f545.tar.xz
Defer SplitKit value mapping until all defs are available.
The greedy register allocator revealed some problems with the value mapping in SplitKit. We would sometimes start mapping values before all defs were known, and that could change a value from a simple 1-1 mapping to a multi-def mapping that requires ssa update. The new approach collects all defs and register assignments first without filling in any live intervals. Only when finish() is called, do we compute liveness and mapped values. At this time we know with certainty which values map to multiple values in a split range. This also has the advantage that we can compute live ranges based on the remaining uses after rematerializing at split points. The current implementation has many opportunities for compile time optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index b2915cee97..88131fbc40 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -560,7 +560,7 @@ namespace llvm {
/// getEqClass - Classify creates equivalence classes numbered 0..N. Return
/// the equivalence class assigned the VNI.
- unsigned getEqClass(const VNInfo *VNI) { return eqClass_[VNI->id]; }
+ unsigned getEqClass(const VNInfo *VNI) const { return eqClass_[VNI->id]; }
/// Distribute - Distribute values in LIV[0] into a separate LiveInterval
/// for each connected component. LIV must have a LiveInterval for each