[llvm-commits] [llvm] r40921 - in /llvm/trunk: include/llvm/CodeGen/LiveInterval.h lib/CodeGen/LiveInterval.cpp
Evan Cheng
evan.cheng at apple.com
Tue Aug 7 22:56:18 PDT 2007
Author: evancheng
Date: Wed Aug 8 00:56:18 2007
New Revision: 40921
URL: http://llvm.org/viewvc/llvm-project?rev=40921&view=rev
Log:
Clean up and bug fix.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveInterval.h
llvm/trunk/lib/CodeGen/LiveInterval.cpp
Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=40921&r1=40920&r2=40921&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Wed Aug 8 00:56:18 2007
@@ -147,19 +147,19 @@
/// getInstForValNum - Return the machine instruction index that defines the
/// specified value number.
unsigned getInstForValNum(unsigned ValNo) const {
- //assert(ValNo < ValueNumberInfo.size());
+ assert(ValNo < ValueNumberInfo.size());
return ValueNumberInfo[ValNo].def;
}
unsigned getSrcRegForValNum(unsigned ValNo) const {
- //assert(ValNo < ValueNumberInfo.size());
+ assert(ValNo < ValueNumberInfo.size());
return ValueNumberInfo[ValNo].reg;
}
/// getKillsForValNum - Return the kill instruction indexes of the specified
/// value number.
- SmallVector<unsigned, 4> getKillsForValNum(unsigned ValNo) const {
- //assert(ValNo < ValueNumberInfo.size());
+ const SmallVector<unsigned, 4> &getKillsForValNum(unsigned ValNo) const {
+ assert(ValNo < ValueNumberInfo.size());
return ValueNumberInfo[ValNo].kills;
}
@@ -170,7 +170,7 @@
}
VNInfo getValNumInfo(unsigned ValNo) const {
- //assert(ValNo < ValueNumberInfo.size());
+ assert(ValNo < ValueNumberInfo.size());
return ValueNumberInfo[ValNo];
}
Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=40921&r1=40920&r2=40921&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Wed Aug 8 00:56:18 2007
@@ -300,7 +300,7 @@
// we want to avoid the interval scan if not.
bool MustMapCurValNos = false;
for (unsigned i = 0, e = getNumValNums(); i != e; ++i) {
- //if (ValueNumberInfo[i].def == ~1U) continue; // tombstone value #
+ if (ValueNumberInfo[i].def == ~1U) continue; // tombstone value #
if (i != (unsigned)LHSValNoAssignments[i]) {
MustMapCurValNos = true;
break;
More information about the llvm-commits
mailing list