LiveInterval::removeKills and isKill don't need 'this' and

can be static member functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61278 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-12-20 16:44:40 +00:00
parent e19c6362d2
commit fce4028718

View File

@ -244,7 +244,7 @@ namespace llvm {
/// removeKills - Remove all the kills in specified range /// removeKills - Remove all the kills in specified range
/// [Start, End] of the specified val#. /// [Start, End] of the specified val#.
void removeKills(VNInfo *VNI, unsigned Start, unsigned End) { static void removeKills(VNInfo *VNI, unsigned Start, unsigned End) {
SmallVector<unsigned, 4> &kills = VNI->kills; SmallVector<unsigned, 4> &kills = VNI->kills;
SmallVector<unsigned, 4>::iterator SmallVector<unsigned, 4>::iterator
I = std::lower_bound(kills.begin(), kills.end(), Start); I = std::lower_bound(kills.begin(), kills.end(), Start);
@ -255,7 +255,7 @@ namespace llvm {
/// isKill - Return true if the specified index is a kill of the /// isKill - Return true if the specified index is a kill of the
/// specified val#. /// specified val#.
bool isKill(const VNInfo *VNI, unsigned KillIdx) const { static bool isKill(const VNInfo *VNI, unsigned KillIdx) {
const SmallVector<unsigned, 4> &kills = VNI->kills; const SmallVector<unsigned, 4> &kills = VNI->kills;
SmallVector<unsigned, 4>::const_iterator SmallVector<unsigned, 4>::const_iterator
I = std::lower_bound(kills.begin(), kills.end(), KillIdx); I = std::lower_bound(kills.begin(), kills.end(), KillIdx);