diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-06-16 21:48:13 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-06-16 21:48:13 +0000 |
commit | b9f84bb0cea5b1fce4269128d87f29cdf1362a03 (patch) | |
tree | 33d2bdaf116121a88581445499a31e685d9702dc /llvm/lib | |
parent | 6261c2dc2850f15722110bfea497602fe5081d2d (diff) | |
download | bcm5719-llvm-b9f84bb0cea5b1fce4269128d87f29cdf1362a03.tar.gz bcm5719-llvm-b9f84bb0cea5b1fce4269128d87f29cdf1362a03.zip |
Guard private fields that are unused in Release builds with #ifndef NDEBUG.
llvm-svn: 158608
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBasic.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 7 |
3 files changed, 15 insertions, 2 deletions
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; diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index 1fa54cd7484..73059ec0ab3 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -64,8 +64,10 @@ class RABasic : public MachineFunctionPass, public RegAllocBase // context MachineFunction *MF; +#ifndef NDEBUG // analyses RenderMachineFunction *RMF; +#endif // state std::auto_ptr<Spiller> SpillerInstance; diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 504c8bdffd1..5427eec4dff 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -186,12 +186,17 @@ namespace { JITEmitter &JE; +#ifndef NDEBUG /// Instance of JIT corresponding to this Resolver. JIT *TheJIT; +#endif public: explicit JITResolver(JIT &jit, JITEmitter &je) - : state(&jit), nextGOTIndex(0), JE(je), TheJIT(&jit) { + : state(&jit), nextGOTIndex(0), JE(je) { +#ifndef NDEBUG + TheJIT = &jit; +#endif LazyResolverFn = jit.getJITInfo().getLazyResolverFunction(JITCompilerFn); } |