[llvm-commits] [llvm] r158608 - in /llvm/trunk: include/llvm/CodeGen/LexicalScopes.h lib/CodeGen/MachineScheduler.cpp lib/CodeGen/RegAllocBasic.cpp lib/ExecutionEngine/JIT/JITEmitter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Jun 16 14:48:13 PDT 2012
Author: d0k
Date: Sat Jun 16 16:48:13 2012
New Revision: 158608
URL: http://llvm.org/viewvc/llvm-project?rev=158608&view=rev
Log:
Guard private fields that are unused in Release builds with #ifndef NDEBUG.
Modified:
llvm/trunk/include/llvm/CodeGen/LexicalScopes.h
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
llvm/trunk/lib/CodeGen/RegAllocBasic.cpp
llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/LexicalScopes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LexicalScopes.h?rev=158608&r1=158607&r2=158608&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LexicalScopes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LexicalScopes.h Sat Jun 16 16:48:13 2012
@@ -158,7 +158,10 @@
public:
LexicalScope(LexicalScope *P, const MDNode *D, const MDNode *I, bool A)
: Parent(P), Desc(D), InlinedAtLocation(I), AbstractScope(A),
- LastInsn(0), FirstInsn(0), DFSIn(0), DFSOut(0), IndentLevel(0) {
+ LastInsn(0), FirstInsn(0), DFSIn(0), DFSOut(0) {
+#ifndef NDEBUG
+ IndentLevel = 0;
+#endif
if (Parent)
Parent->addChild(this);
}
@@ -241,7 +244,9 @@
const MachineInstr *FirstInsn; // First instruction of this scope.
unsigned DFSIn, DFSOut; // In & Out Depth use to determine
// scope nesting.
+#ifndef NDEBUG
mutable unsigned IndentLevel; // Private state for dump()
+#endif
};
} // end llvm namespace
Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=158608&r1=158607&r2=158608&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Sat Jun 16 16:48:13 2012
@@ -351,15 +351,21 @@
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;
Modified: llvm/trunk/lib/CodeGen/RegAllocBasic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBasic.cpp?rev=158608&r1=158607&r2=158608&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocBasic.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocBasic.cpp Sat Jun 16 16:48:13 2012
@@ -64,8 +64,10 @@
// context
MachineFunction *MF;
+#ifndef NDEBUG
// analyses
RenderMachineFunction *RMF;
+#endif
// state
std::auto_ptr<Spiller> SpillerInstance;
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=158608&r1=158607&r2=158608&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Sat Jun 16 16:48:13 2012
@@ -186,12 +186,17 @@
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);
}
More information about the llvm-commits
mailing list