Make fast-isel miss counting in -stats and -fast-isel-verbose take terminators into...
authorEli Friedman <eli.friedman@gmail.com>
Tue, 17 May 2011 23:02:10 +0000 (23:02 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 17 May 2011 23:02:10 +0000 (23:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131502 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index a7453c64dddf473b35dc7cdd72f93e9092309613..2818b3268717145529ff2eb9b65bc3ec893b0cca 100644 (file)
@@ -972,9 +972,14 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
           continue;
         }
 
-        // Otherwise, give up on FastISel for the rest of the block.
-        // For now, be a little lenient about non-branch terminators.
-        if (!isa<TerminatorInst>(Inst) || isa<BranchInst>(Inst)) {
+        if (isa<TerminatorInst>(Inst) && !isa<BranchInst>(Inst)) {
+          // Don't abort, and use a different message for terminator misses.
+          ++NumFastIselFailures;
+          if (EnableFastISelVerbose || EnableFastISelAbort) {
+            dbgs() << "FastISel missed terminator: ";
+            Inst->dump();
+          }
+        } else {
           ++NumFastIselFailures;
           if (EnableFastISelVerbose || EnableFastISelAbort) {
             dbgs() << "FastISel miss: ";