summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-28 19:46:56 +0000
committerChris Lattner <sabre@nondot.org>2010-03-28 19:46:56 +0000
commit03719af41dd0038045e8e3d9926094bf13bae7c4 (patch)
tree1bfd0ea1c3e4e5ba7588d5f9dba479b228a77ee9 /llvm/lib/CodeGen/SelectionDAG
parente87fae9afa223534d48da8ea3f9462ef297aff42 (diff)
downloadbcm5719-llvm-03719af41dd0038045e8e3d9926094bf13bae7c4.tar.gz
bcm5719-llvm-03719af41dd0038045e8e3d9926094bf13bae7c4.zip
add a statistic for the # times isel has to backtrack.
llvm-svn: 99774
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 2169cee5a67..37fb129e570 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -61,6 +61,7 @@
using namespace llvm;
STATISTIC(NumFastIselFailures, "Number of instructions fast isel failed on");
+STATISTIC(NumDAGIselRetries,"Number of times dag isel has to try another path");
static cl::opt<bool>
EnableFastISelVerbose("fast-isel-verbose", cl::Hidden,
@@ -2198,7 +2199,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
DEBUG(errs() << " Skipped scope entry (due to false predicate) at "
<< "index " << MatcherIndexOfPredicate
<< ", continuing at " << FailIndex << "\n");
-
+ ++NumDAGIselRetries;
// Otherwise, we know that this case of the Scope is guaranteed to fail,
// move to the next case.
@@ -2719,6 +2720,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
// another child to try in the current 'Scope', otherwise pop it until we
// find a case to check.
DEBUG(errs() << " Match failed at index " << CurrentOpcodeIndex << "\n");
+ ++NumDAGIselRetries;
while (1) {
if (MatchScopes.empty()) {
CannotYetSelect(NodeToMatch);
OpenPOWER on IntegriCloud