aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-08 08:24:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-08 08:24:28 +0000
commitb81461a91833f129dfa46fbe47445fb0b7155483 (patch)
treec31cdc76fe2b0914bad4f7522e1c2481a60062ab /include/llvm
parentf1162978c6e979010cf65a8ecaa7d3f644f8d31a (diff)
downloadexternal_llvm-b81461a91833f129dfa46fbe47445fb0b7155483.zip
external_llvm-b81461a91833f129dfa46fbe47445fb0b7155483.tar.gz
external_llvm-b81461a91833f129dfa46fbe47445fb0b7155483.tar.bz2
Strengthen the previous check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index f06ca43..1e8202e 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -272,17 +272,15 @@ namespace llvm {
return I != kills.end() && *I == KillIdx;
}
- /// isOnlyKill - Return true if the specified index is the only kill of the
- /// specified val#.
- static bool isOnlyKill(const VNInfo *VNI, unsigned KillIdx) {
- bool Found = false;
- const SmallVector<unsigned, 4> &kills = VNI->kills;
- for (unsigned i = 0, e = kills.size(); i != e; ++i) {
- if (KillIdx != kills[i])
+ /// 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;
- Found = true;
}
- return Found;
+ return true;
}
/// MergeValueNumberInto - This method is called when two value nubmers