summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-02-18 00:23:25 +0000
committerTanya Lattner <tonic@nondot.org>2009-02-18 00:23:25 +0000
commitb0ba5215f6ae7faf412cf42b85ec4ad3fd0eefbc (patch)
treeef1c71a465a8ecadb304142394d3534a0ebc1b4c
parent41b57f5044c9e9e737ff20f55dc980026f4152f7 (diff)
downloadllvm-b0ba5215f6ae7faf412cf42b85ec4ad3fd0eefbc.tar.gz
Merge from mainline. Complete 64076 merge from mainline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_25@64861 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/LiveInterval.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index fb7448635711..1e8202e5f4bf 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -271,6 +271,17 @@ namespace llvm {
I = std::lower_bound(kills.begin(), kills.end(), KillIdx);
return I != kills.end() && *I == KillIdx;
}
+
+ /// isOnlyLROfValNo - Return true if the specified live range is the only
+ /// one defined by the its val#.
+ bool isOnlyLROfValNo( const LiveRange *LR) {
+ for (const_iterator I = begin(), E = end(); I != E; ++I) {
+ const LiveRange *Tmp = I;
+ if (Tmp != LR && Tmp->valno == LR->valno)
+ return false;
+ }
+ return true;
+ }
/// MergeValueNumberInto - This method is called when two value nubmers
/// are found to be equivalent. This eliminates V1, replacing all