summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-09-13 18:05:29 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-09-13 18:05:29 +0000
commite5a2e366322ef5f0d597b1fb8dbf55f2cf36cf15 (patch)
treeee9e0458b43ca5ac8215fa89e09019f9f31ed5dc /lib/CodeGen/SplitKit.h
parentb6b7f515e2b90c9f9b6cdd5b9648121f6ad2b3a1 (diff)
downloadllvm-e5a2e366322ef5f0d597b1fb8dbf55f2cf36cf15.tar.gz
llvm-e5a2e366322ef5f0d597b1fb8dbf55f2cf36cf15.tar.bz2
llvm-e5a2e366322ef5f0d597b1fb8dbf55f2cf36cf15.tar.xz
Add SplitEditor::markOverlappedComplement().
This function is used to flag values where the complement interval may overlap other intervals. Call it from overlapIntv, and use the flag to fully recompute those live ranges in transferValues(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 1a4937ccda..5abdd4c62e 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -250,6 +250,10 @@ private:
/// The current spill mode, selected by reset().
ComplementSpillMode SpillMode;
+ /// Parent interval values where the complement interval may be overlapping
+ /// other intervals.
+ SmallPtrSet<const VNInfo*, 8> OverlappedComplement;
+
typedef IntervalMap<SlotIndex, unsigned> RegAssignMap;
/// Allocator for the interval map. This will eventually be shared with
@@ -296,6 +300,17 @@ private:
/// of the number of defs.
void markComplexMapped(unsigned RegIdx, const VNInfo *ParentVNI);
+ /// markOverlappedComplement - Mark ParentVNI as being overlapped in the
+ /// complement interval. The complement interval may overlap other intervals
+ /// after overlapIntv has been called, or when in spill mode.
+ void markOverlappedComplement(const VNInfo *ParentVNI);
+
+ /// needsRecompute - Returns true if the live range of ParentVNI needs to be
+ /// recomputed in RegIdx using LiveRangeCalc::extend. This is the case if
+ /// the value has been rematerialized, or when back-copies have been hoisted
+ /// in spill mode.
+ bool needsRecompute(unsigned RegIdx, const VNInfo *ParentVNI);
+
/// defFromParent - Define Reg from ParentVNI at UseIdx using either
/// rematerialization or a COPY from parent. Return the new value.
VNInfo *defFromParent(unsigned RegIdx,