diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-08 07:48:37 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-08 07:48:37 +0000 |
commit | 69b8873a33af59f7ded4f5e1924bfe3f4cdd48e5 (patch) | |
tree | 8270f14559be966445f51c716ca4895764843a78 /include | |
parent | 3e1258bc7f453039117cd2b1fbea5579f932d548 (diff) | |
download | external_llvm-69b8873a33af59f7ded4f5e1924bfe3f4cdd48e5.zip external_llvm-69b8873a33af59f7ded4f5e1924bfe3f4cdd48e5.tar.gz external_llvm-69b8873a33af59f7ded4f5e1924bfe3f4cdd48e5.tar.bz2 |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index fb74486..f06ca43 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -271,6 +271,19 @@ namespace llvm { I = std::lower_bound(kills.begin(), kills.end(), KillIdx); 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]) + return false; + Found = true; + } + return Found; + } /// MergeValueNumberInto - This method is called when two value nubmers /// are found to be equivalent. This eliminates V1, replacing all |