[PATCH] D151842: [TableGen] Add !setdagarg and !setdagname
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 02:29:29 PDT 2023
simon_tatham added a comment.
> As the naming suggests, it sets the argument name/value by the specified argument by either index or name (for argument value only.)
I think Paul's point is that the use of English is confusing. "Replace X by Y" is normally taken to mean the same thing as "Replace X with Y", and both of them mean putting Y where X used to be. So "replacing the argument name by the specified index" suggests that the function will put an integer index where a name used to be, which makes no sense.
It looks as if what you actually mean is something like:
`!setdagarg(dag, key, arg)` produces a DAG node with the same operator and argument list as `dag`, except that the argument identified by `key` (which can be a string name or an integer index) has its value replaced by `arg`.
`!setdagname(dag, index, name)` produces a DAG node with the same operator and argument list as `dag`, except that the argument identified by `index` (which must be integer index) has its name field replaced by `name`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151842/new/
https://reviews.llvm.org/D151842
More information about the llvm-commits
mailing list