summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SlotIndexes.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-15 21:47:57 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-15 21:47:57 +0000
commitb4ddedce599183362b0f0333922c2fe0e163a129 (patch)
tree8917e4167246d0138b4c7be66fbf46554ceccda9 /include/llvm/CodeGen/SlotIndexes.h
parent6a109f9d70bf7f75541400145a7a89880cc48166 (diff)
downloadllvm-b4ddedce599183362b0f0333922c2fe0e163a129.tar.gz
llvm-b4ddedce599183362b0f0333922c2fe0e163a129.tar.bz2
llvm-b4ddedce599183362b0f0333922c2fe0e163a129.tar.xz
Extract parts of RAGreedy::splitAroundRegion as SplitKit methods.
This gets rid of some of the gory splitting details in RAGreedy and makes them available to future SplitKit clients. Slightly generalize the functionality to support multi-way splitting. Specifically, SplitEditor::splitLiveThroughBlock() supports switching between different register intervals in a block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SlotIndexes.h')
-rw-r--r--include/llvm/CodeGen/SlotIndexes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SlotIndexes.h b/include/llvm/CodeGen/SlotIndexes.h
index 33ce675e5c..6eb3180212 100644
--- a/include/llvm/CodeGen/SlotIndexes.h
+++ b/include/llvm/CodeGen/SlotIndexes.h
@@ -140,6 +140,9 @@ namespace llvm {
return lie.getPointer();
}
+ /// Return true for a valid index.
+ operator bool() const { return isValid(); }
+
/// Print this index to the given raw_ostream.
void print(raw_ostream &os) const;