Fix a subtle bug in DeadMachineInstructionElim's liveness
[oota-llvm.git] / lib / CodeGen / LiveInterval.cpp
index 24081b99c0e4cae49672694e8f93b8d19562fa7d..ff430d71c7d79247424a406ae98202990f42c53e 100644 (file)
@@ -547,7 +547,7 @@ void LiveInterval::MergeValueInAsValue(const LiveInterval &RHS,
 /// used with an unknown definition value.
 void LiveInterval::MergeInClobberRanges(const LiveInterval &Clobbers,
                                         BumpPtrAllocator &VNInfoAllocator) {
-  if (Clobbers.begin() == Clobbers.end()) return;
+  if (Clobbers.empty()) return;
   
   // Find a value # to use for the clobber ranges.  If there is already a value#
   // for unknown values, use it.
@@ -678,8 +678,8 @@ void LiveRange::dump() const {
 
 void LiveInterval::print(std::ostream &OS,
                          const TargetRegisterInfo *TRI) const {
-  if (isSS)
-    OS << "SS#" << reg;
+  if (isStackSlot())
+    OS << "SS#" << getStackSlotIndex();
   else if (TRI && TargetRegisterInfo::isPhysicalRegister(reg))
     OS << TRI->getName(reg);
   else