[Asm] Finish matching once end of formal and actual lists reached (NFC)
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 21 Nov 2017 15:12:05 +0000 (15:12 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 21 Nov 2017 15:12:05 +0000 (15:12 +0000)
This is NFC, as the matcher would continue looping up to the maximum
number of operands with no effect, but this should improve performance a
bit, and makes the debug trace clearer.

Differential revision: https://reviews.llvm.org/D36744

llvm-svn: 318769

llvm/utils/TableGen/AsmMatcherEmitter.cpp

index d279e8c..4fe060b 100644 (file)
@@ -3323,6 +3323,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
     OS << "          }\n";
     OS << "        } else {\n";
     OS << "          DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"but formal operand not required\\n\");\n";
+    OS << "          break;\n";
     OS << "        }\n";
     OS << "        continue;\n";
   } else {