diff options
| author | Chad Rosier <mcrosier@apple.com> | 2011-11-16 21:05:28 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@apple.com> | 2011-11-16 21:05:28 +0000 |
| commit | ff40b1e16437f1ddbea9244a1c23f19fb6e72f98 (patch) | |
| tree | 110c9c89c61c676973dcd0ec6205a89b2974a188 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
| parent | cfd0d10e72d73707b5e0bf0e8eee0cf621f996f1 (diff) | |
| download | bcm5719-llvm-ff40b1e16437f1ddbea9244a1c23f19fb6e72f98.tar.gz bcm5719-llvm-ff40b1e16437f1ddbea9244a1c23f19fb6e72f98.zip | |
Add fast-isel stats to determine who's doing all the work, the
target-independent selector or the target-specific selector.
llvm-svn: 144833
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index c58d730454f..f0fe179e050 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -39,6 +39,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "isel" #include "llvm/Function.h" #include "llvm/GlobalVariable.h" #include "llvm/Instructions.h" @@ -58,8 +59,12 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Debug.h" +#include "llvm/ADT/Statistic.h" using namespace llvm; +STATISTIC(NumFastIselSuccessIndependent, "Number of insts selected by target-independent selector"); +STATISTIC(NumFastIselSuccessTarget, "Number of insts selected by target-specific selector"); + /// startNewBlock - Set the current block to which generated machine /// instructions will be appended, and clear the local CSE map. /// @@ -765,12 +770,14 @@ FastISel::SelectInstruction(const Instruction *I) { // First, try doing target-independent selection. if (SelectOperator(I, I->getOpcode())) { + ++NumFastIselSuccessIndependent; DL = DebugLoc(); return true; } // Next, try calling the target to attempt to handle the instruction. if (TargetSelectInstruction(I)) { + ++NumFastIselSuccessTarget; DL = DebugLoc(); return true; } |

