aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-02-28 18:05:12 +0000
committerEli Bendersky <eliben@google.com>2013-02-28 18:05:12 +0000
commit0a4da5f0fe70d0da620e504863f24881a5f9f7cb (patch)
tree7dd8d38588f417b84d4134283c9b6cc43c1f1a29 /lib/CodeGen
parent2d1035def15030ae404b227747d0a28454ea32a9 (diff)
downloadexternal_llvm-0a4da5f0fe70d0da620e504863f24881a5f9f7cb.zip
external_llvm-0a4da5f0fe70d0da620e504863f24881a5f9f7cb.tar.gz
external_llvm-0a4da5f0fe70d0da620e504863f24881a5f9f7cb.tar.bz2
Put some per-instruction statistics of fast isel under NDEBUG, together with
other per-instruction statistics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 04f5b32..a11f434 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -63,11 +63,13 @@
#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.
@@ -332,7 +334,7 @@ void FastISel::removeDeadCode(MachineBasicBlock::iterator I,
MachineInstr *Dead = &*I;
++I;
Dead->eraseFromParent();
- ++NumFastIselDead;
+ DEBUG(++NumFastIselDead);
}
recomputeInsertPt();
}
@@ -823,7 +825,7 @@ FastISel::SelectInstruction(const Instruction *I) {
// First, try doing target-independent selection.
if (SelectOperator(I, I->getOpcode())) {
- ++NumFastIselSuccessIndependent;
+ DEBUG(++NumFastIselSuccessIndependent);
DL = DebugLoc();
return true;
}
@@ -838,7 +840,7 @@ FastISel::SelectInstruction(const Instruction *I) {
// Next, try calling the target to attempt to handle the instruction.
SavedInsertPt = FuncInfo.InsertPt;
if (TargetSelectInstruction(I)) {
- ++NumFastIselSuccessTarget;
+ DEBUG(++NumFastIselSuccessTarget);
DL = DebugLoc();
return true;
}