[PATCH] D44110: TableGen: Add !dag function for construction
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 6 13:34:17 PST 2018
tra added inline comments.
================
Comment at: docs/TableGen/LangIntro.rst:178
+
+ Example: !dag(op, [a1, a2], ["name1", "name2"]) results in
+ (op a1:$name1, a2:$name2).
----------------
Is it possible to construct a dag that has mix of dags and records as children? E.g `(op1 (op11 a111, a112:$n112), a12)` ? That is sometimes needsd to construct patterns where one of the arguments should be a dag (e.g. NVPTX uses a wrapper node for global symbols).
================
Comment at: lib/TableGen/TGParser.cpp:1226
+ if (!MHSt && !isa<UnsetInit>(MHS)) {
+ Error(MHSLoc, "could not determine type of argument of !dag");
+ return nullptr;
----------------
The error should be more specific describing which argument is in error -- op, children or names (or operand index). Same in the RHS handling below.
Repository:
rL LLVM
https://reviews.llvm.org/D44110
More information about the llvm-commits
mailing list