[llvm] r176273 - Put some per-instruction statistics of fast isel under NDEBUG, together with
Eli Bendersky
eliben at google.com
Thu Feb 28 10:05:12 PST 2013
Author: eliben
Date: Thu Feb 28 12:05:12 2013
New Revision: 176273
URL: http://llvm.org/viewvc/llvm-project?rev=176273&view=rev
Log:
Put some per-instruction statistics of fast isel under NDEBUG, together with
other per-instruction statistics.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=176273&r1=176272&r2=176273&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Thu Feb 28 12:05:12 2013
@@ -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(MachineBas
MachineInstr *Dead = &*I;
++I;
Dead->eraseFromParent();
- ++NumFastIselDead;
+ DEBUG(++NumFastIselDead);
}
recomputeInsertPt();
}
@@ -823,7 +825,7 @@ FastISel::SelectInstruction(const Instru
// 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 Instru
// Next, try calling the target to attempt to handle the instruction.
SavedInsertPt = FuncInfo.InsertPt;
if (TargetSelectInstruction(I)) {
- ++NumFastIselSuccessTarget;
+ DEBUG(++NumFastIselSuccessTarget);
DL = DebugLoc();
return true;
}
More information about the llvm-commits
mailing list