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 | 77fde2cbb1fbf9daf5235fa734c6c09b2d530617 (patch) | |
tree | 8270f14559be966445f51c716ca4895764843a78 /include/llvm/CodeGen/LiveInterval.h | |
parent | da01af76670f4e7296923bcf9382465875ef9b0a (diff) |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-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 fb74486357..f06ca43f2b 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 |