diff options
author | Jan Wen Voung <jvoung@google.com> | 2013-03-08 22:56:31 +0000 |
---|---|---|
committer | Jan Wen Voung <jvoung@google.com> | 2013-03-08 22:56:31 +0000 |
commit | fa785cb22d50c657eb08c762d627cd6aa96982f3 (patch) | |
tree | 8cf730a27cbe3d59e14adb2e0e2ed6d3f836850b /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | d25c05efd55fe190a50965b31e04db69bd8e19de (diff) |
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 4fb9c5c8a0..aa45ac5958 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 @@ void FastISel::removeDeadCode(MachineBasicBlock::iterator I, MachineInstr *Dead = &*I; ++I; Dead->eraseFromParent(); - DEBUG(++NumFastIselDead); + ++NumFastIselDead; } recomputeInsertPt(); } @@ -830,7 +828,7 @@ FastISel::SelectInstruction(const Instruction *I) { // First, try doing target-independent selection. if (SelectOperator(I, I->getOpcode())) { - DEBUG(++NumFastIselSuccessIndependent); + ++NumFastIselSuccessIndependent; DL = DebugLoc(); return true; } @@ -845,7 +843,7 @@ FastISel::SelectInstruction(const Instruction *I) { // Next, try calling the target to attempt to handle the instruction. SavedInsertPt = FuncInfo.InsertPt; if (TargetSelectInstruction(I)) { - DEBUG(++NumFastIselSuccessTarget); + ++NumFastIselSuccessTarget; DL = DebugLoc(); return true; } |