summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SlotIndexes.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-04 15:32:15 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-04 15:32:15 +0000
commit6c8afd728eb02742ce320ecd39bcf3774d8423b7 (patch)
treec74771352059404cd652904e561e1b535316edef /include/llvm/CodeGen/SlotIndexes.h
parent5c4c4d4b82a658643c8daefd5cc76d5c712285ed (diff)
downloadllvm-6c8afd728eb02742ce320ecd39bcf3774d8423b7.tar.gz
llvm-6c8afd728eb02742ce320ecd39bcf3774d8423b7.tar.bz2
llvm-6c8afd728eb02742ce320ecd39bcf3774d8423b7.tar.xz
Stop caching basic block index ranges now that SlotIndexes can keep up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SlotIndexes.h')
-rw-r--r--include/llvm/CodeGen/SlotIndexes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SlotIndexes.h b/include/llvm/CodeGen/SlotIndexes.h
index 2d9ae5f29a..7cc31563b6 100644
--- a/include/llvm/CodeGen/SlotIndexes.h
+++ b/include/llvm/CodeGen/SlotIndexes.h
@@ -518,11 +518,21 @@ namespace llvm {
return getMBBRange(MBB->getNumber());
}
+ /// Returns the first index in the given basic block number.
+ SlotIndex getMBBStartIdx(unsigned Num) const {
+ return getMBBRange(Num).first;
+ }
+
/// Returns the first index in the given basic block.
SlotIndex getMBBStartIdx(const MachineBasicBlock *mbb) const {
return getMBBRange(mbb).first;
}
+ /// Returns the last index in the given basic block number.
+ SlotIndex getMBBEndIdx(unsigned Num) const {
+ return getMBBRange(Num).second;
+ }
+
/// Returns the last index in the given basic block.
SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const {
return getMBBRange(mbb).second;