From b9f84bb0cea5b1fce4269128d87f29cdf1362a03 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 16 Jun 2012 21:48:13 +0000 Subject: Guard private fields that are unused in Release builds with #ifndef NDEBUG. llvm-svn: 158608 --- llvm/lib/CodeGen/MachineScheduler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp') diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 1783cbe21ee..3b8e826e5ac 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -351,15 +351,21 @@ class ScheduleDAGMI : public ScheduleDAGInstrs { IntervalPressure BotPressure; RegPressureTracker BotRPTracker; +#ifndef NDEBUG /// The number of instructions scheduled so far. Used to cut off the /// scheduler at the point determined by misched-cutoff. unsigned NumInstrsScheduled; +#endif public: ScheduleDAGMI(MachineSchedContext *C, MachineSchedStrategy *S): ScheduleDAGInstrs(*C->MF, *C->MLI, *C->MDT, /*IsPostRA=*/false, C->LIS), AA(C->AA), RegClassInfo(C->RegClassInfo), SchedImpl(S), RPTracker(RegPressure), CurrentTop(), TopRPTracker(TopPressure), - CurrentBottom(), BotRPTracker(BotPressure), NumInstrsScheduled(0) {} + CurrentBottom(), BotRPTracker(BotPressure) { +#ifndef NDEBUG + NumInstrsScheduled = 0; +#endif + } ~ScheduleDAGMI() { delete SchedImpl; -- cgit v1.2.3