Disable statistics on Release builds and move tests that depend on -stats.
Summary:
Statistics are still available in Release+Asserts (any +Asserts builds),
and stats can also be turned on with LLVM_ENABLE_STATS.
Move some of the FastISel stats that were moved under DEBUG()
back out of DEBUG(), since stats are disabled across the board now.
Many tests depend on grepping "-stats" output. Move those into
a orig_dir/Stats/. so that they can be marked as unsupported
when building without statistics.
Differential Revision: http://llvm-reviews.chandlerc.com/D486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176733 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 4fb9c5c..aa45ac5 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -63,13 +63,11 @@
#include "llvm/Target/TargetMachine.h"
using namespace llvm;
-#ifndef NDEBUG
STATISTIC(NumFastIselSuccessIndependent, "Number of insts selected by "
"target-independent selector");
STATISTIC(NumFastIselSuccessTarget, "Number of insts selected by "
"target-specific selector");
STATISTIC(NumFastIselDead, "Number of dead insts removed on failure");
-#endif // NDEBUG
/// startNewBlock - Set the current block to which generated machine
/// instructions will be appended, and clear the local CSE map.
@@ -334,7 +332,7 @@
MachineInstr *Dead = &*I;
++I;
Dead->eraseFromParent();
- DEBUG(++NumFastIselDead);
+ ++NumFastIselDead;
}
recomputeInsertPt();
}
@@ -830,7 +828,7 @@
// First, try doing target-independent selection.
if (SelectOperator(I, I->getOpcode())) {
- DEBUG(++NumFastIselSuccessIndependent);
+ ++NumFastIselSuccessIndependent;
DL = DebugLoc();
return true;
}
@@ -845,7 +843,7 @@
// Next, try calling the target to attempt to handle the instruction.
SavedInsertPt = FuncInfo.InsertPt;
if (TargetSelectInstruction(I)) {
- DEBUG(++NumFastIselSuccessTarget);
+ ++NumFastIselSuccessTarget;
DL = DebugLoc();
return true;
}