summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-21 23:09:46 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-21 23:09:46 +0000
commit06c0f25499fd502668ca720b0fea4a4dfe6eb44a (patch)
treeef6511335a873ab5384d7be495be8ff8791e2d67 /lib/CodeGen/SplitKit.h
parent89e59e6343303696e14d4c134582dda083cf7408 (diff)
downloadllvm-06c0f25499fd502668ca720b0fea4a4dfe6eb44a.tar.gz
llvm-06c0f25499fd502668ca720b0fea4a4dfe6eb44a.tar.bz2
llvm-06c0f25499fd502668ca720b0fea4a4dfe6eb44a.tar.xz
Add SplitKit::isOriginalEndpoint and use it to force live range splitting to terminate.
An original endpoint is an instruction that killed or defined the original live range before any live ranges were split. When splitting global live ranges, avoid creating local live ranges without any original endpoints. We may still create global live ranges without original endpoints, but such a range won't be split again, and live range splitting still terminates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 5c34afd1c8..e02e629703 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -125,6 +125,13 @@ public:
return UsingBlocks.lookup(MBB);
}
+ /// isOriginalEndpoint - Return true if the original live range was killed or
+ /// (re-)defined at Idx. Idx should be the 'def' slot for a normal kill/def,
+ /// and 'use' for an early-clobber def.
+ /// This can be used to recognize code inserted by earlier live range
+ /// splitting.
+ bool isOriginalEndpoint(SlotIndex Idx) const;
+
typedef SmallPtrSet<const MachineBasicBlock*, 16> BlockPtrSet;
// Print a set of blocks with use counts.