aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-21 18:38:15 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-21 18:38:15 +0000
commit5928046306d8bbe7db35707c294689f515f90e56 (patch)
tree4bd187d7add20d1868bd4a70dda4212b9d5467f3 /lib/CodeGen/SplitKit.h
parent1ac7fe0f4dae8a9266fa6ff31ea4939ec64a3e5e (diff)
downloadexternal_llvm-5928046306d8bbe7db35707c294689f515f90e56.tar.gz
external_llvm-5928046306d8bbe7db35707c294689f515f90e56.tar.bz2
external_llvm-5928046306d8bbe7db35707c294689f515f90e56.zip
Allow allocatable ranges from global live range splitting to be split again.
These intervals are allocatable immediately after splitting, but they may be evicted because of later splitting. This is rare, but when it happens they should be split again. The remainder intervals that cannot be allocated after splitting still move directly to spilling. SplitEditor::finish can optionally provide a mapping from new live intervals back to the original interval indexes returned by openIntv(). Each original interval index can map to multiple new intervals after connected components have been separated. Dead code elimination may also add existing intervals to the list. The reverse mapping allows the SplitEditor client to treat the new intervals differently depending on the split region they came from. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index cc41e2e321..a8f59d44f6 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -368,7 +368,10 @@ public:
/// finish - after all the new live ranges have been created, compute the
/// remaining live range, and rewrite instructions to use the new registers.
- void finish();
+ /// @param LRMap When not null, this vector will map each live range in Edit
+ /// back to the indices returned by openIntv.
+ /// There may be extra indices created by dead code elimination.
+ void finish(SmallVectorImpl<unsigned> *LRMap = 0);
/// dump - print the current interval maping to dbgs().
void dump() const;