[PATCH] Support REG_SEQUENCE in tablegen.

Matt Arsenault Matthew.Arsenault at amd.com
Sun Nov 2 15:53:40 PST 2014


================
Comment at: utils/TableGen/CodeGenDAGPatterns.cpp:1790
@@ -1751,5 +1789,3 @@
 
-    if (ChildNo != getNumChildren()) {
-      TP.error("Instruction '" + getOperator()->getName() +
-               "' was provided too many operands!");
-      return false;
+    if (getOperator()->getName() != "REG_SEQUENCE") {
+      if (ChildNo != getNumChildren()) {
----------------
hfinkel wrote:
> Don't need {} here (and you could merge this new condition into the existing if.
Merged, and changed to the correct isVariadic which I missed before.

================
Comment at: utils/TableGen/DAGISelMatcherGen.cpp:820
@@ +819,3 @@
+  // variable_ops.
+  if (II.Operands.isVariadic) {
+    for (unsigned I = ChildNo, E = N->getNumChildren(); I < E; ++I)
----------------
hfinkel wrote:
> Don't need {} here.
clang-format and I disagree here

http://reviews.llvm.org/D6075






More information about the llvm-commits mailing list