[PATCH] D148915: [TableGen] Introduce function and lambda
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 26 14:42:28 PDT 2023
tra added inline comments.
================
Comment at: llvm/docs/TableGen/ProgRef.rst:302
+``function<``\ *rettype*\ ``[,`` *argtype*\ ``]*>``
+ This type represents a function who returns a value of the *rettype* and may
+ have several argument types *argtype* (can be empty). The return type and
----------------
`function that returns`
================
Comment at: llvm/docs/TableGen/ProgRef.rst:303
+ This type represents a function who returns a value of the *rettype* and may
+ have several argument types *argtype* (can be empty). The return type and
+ argument type are arbitrary; it can even be another function type.
----------------
`may have zero or more arguments with *argtype*`
================
Comment at: llvm/docs/TableGen/ProgRef.rst:303-304
+ This type represents a function who returns a value of the *rettype* and may
+ have several argument types *argtype* (can be empty). The return type and
+ argument type are arbitrary; it can even be another function type.
+ Two function types are compatible if their return type and argument types
----------------
tra wrote:
> `may have zero or more arguments with *argtype*`
I'm not sure we need it. I think it's implied that any valid type is a... valid type. It would make sense to list restrictions, if we had any, but given that there are none, I think we can just skip it.
================
Comment at: llvm/docs/TableGen/ProgRef.rst:305
+ argument type are arbitrary; it can even be another function type.
+ Two function types are compatible if their return type and argument types
+ are compatible.
----------------
`compatible` is not defined anywhere in the preceeding text. You may want to add a definition at the beginning of the section.
================
Comment at: llvm/docs/TableGen/ProgRef.rst:551-552
+ The final value is the result of calling *value* with arguments *(a, ...)*.
+ *value* should be callable, which means its final value should be a reference
+ to a function.
+
----------------
Do we have anything else, other than function reference which we would consider to be a `callable`?
If `callable` == `function reference`, perhaps we can rephrase it like that.
E.g. "*value* must evaluate to a function reference."
================
Comment at: llvm/docs/TableGen/ProgRef.rst:704
+
+A ``function`` statement defines an function that can be called.
+
----------------
"defines a function"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148915/new/
https://reviews.llvm.org/D148915
More information about the llvm-commits
mailing list