[PATCH] D69077: [gicombiner] Add the MatchDag structure and parse instruction DAG's from the input

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 10:23:54 PST 2019


volkan accepted this revision.
volkan added a comment.
This revision is now accepted and ready to land.

LGTM with a few nits.



================
Comment at: llvm/utils/TableGen/GICombinerEmitter.cpp:334
+                  to_string(*NameAndDefOp.Matcher) + "");
+      FailedToAddEdges = true;
+    }
----------------
Is there a reason not to add `continue` here? Do we want to keep processing if it failed to add edges?


================
Comment at: llvm/utils/TableGen/GICombinerEmitter.cpp:458
+  });
+  if (StopAfterParse) {
+    return Rule;
----------------
Nit: curly braces can be removed.


================
Comment at: llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.cpp:11
+#include "GIMatchDag.h"
+
+#include "llvm/TableGen/Record.h"
----------------
Nit: empty lines


================
Comment at: llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.cpp:20
+  OS << "(";
+  if (getOpcodeAnnotation())
+    OS << getOpcodeAnnotation()->TheDef->getName();
----------------
Nit: this can be replaced with `if (auto Annotation = getOpcodeAnnotation())`


================
Comment at: llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.h:13
+#include "GIMatchDagOperands.h"
+
+#include "llvm/ADT/DenseMap.h"
----------------
Nit: empty line


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69077/new/

https://reviews.llvm.org/D69077





More information about the llvm-commits mailing list