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
This commit is contained in:
Jan Wen Voung
2013-03-08 22:56:31 +00:00
parent d25c05efd5
commit fa785cb22d
91 changed files with 143 additions and 21 deletions

View File

@@ -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;
}