Silience unused warnings.
authorDevang Patel <dpatel@apple.com>
Tue, 23 Dec 2008 21:55:04 +0000 (21:55 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 23 Dec 2008 21:55:04 +0000 (21:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61390 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocSimple.cpp
lib/CodeGen/RegisterScavenging.cpp

index 7dc98904abcc9b8625b41b8dd337ae91e4600a2b..5e5290ce3e30181fffcfc0c64c86a7e8679d9c39 100644 (file)
@@ -122,7 +122,9 @@ int RegAllocSimple::getStackSpaceFor(unsigned VirtReg,
 unsigned RegAllocSimple::getFreeReg(unsigned virtualReg) {
   const TargetRegisterClass* RC = MF->getRegInfo().getRegClass(virtualReg);
   TargetRegisterClass::iterator RI = RC->allocation_order_begin(*MF);
+#ifndef NDEBUG
   TargetRegisterClass::iterator RE = RC->allocation_order_end(*MF);
+#endif
 
   while (1) {
     unsigned regIdx = RegClassIdx[RC]++;
index add639a967129da54de59d94aec1934d68fa8abd..ff593c156dd9c612d7097994da81245c75d9d23e 100644 (file)
@@ -139,6 +139,7 @@ void RegScavenger::restoreScavengedReg() {
   ScavengedRC = NULL;
 }
 
+#ifndef NDEBUG
 /// isLiveInButUnusedBefore - Return true if register is livein the MBB not
 /// not used before it reaches the MI that defines register.
 static bool isLiveInButUnusedBefore(unsigned Reg, MachineInstr *MI,
@@ -172,6 +173,7 @@ static bool isLiveInButUnusedBefore(unsigned Reg, MachineInstr *MI,
       return false;
   return true;
 }
+#endif
 
 void RegScavenger::forward() {
   // Move ptr forward.