aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/RegAllocSimple.cpp2
-rw-r--r--lib/CodeGen/RegisterScavenging.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp
index 7dc98904ab..5e5290ce3e 100644
--- a/lib/CodeGen/RegAllocSimple.cpp
+++ b/lib/CodeGen/RegAllocSimple.cpp
@@ -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]++;
diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp
index add639a967..ff593c156d 100644
--- a/lib/CodeGen/RegisterScavenging.cpp
+++ b/lib/CodeGen/RegisterScavenging.cpp
@@ -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.