]> granicus.if.org Git - llvm/commitdiff
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318769 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/AsmMatcherEmitter.cpp

index d279e8c3ae9490c3924db4cc7c12b36661479f4c..4fe060b05fa71e82709f0992b9eb729fec6d0dce 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 {