[PATCH] D151842: [TableGen] Add !setdagarg and !setdagname

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 17:55:20 PDT 2023


hliao added a comment.

In D151842#4387522 <https://reviews.llvm.org/D151842#4387522>, @simon_tatham wrote:

> I wonder if it might make sense to allow `!setdagname` to take a string name argument, like `!setdagarg` and `!getdagarg` do?
>
> Obviously, it makes no sense for `!getdagname`, because if you're trying to find the name of the argument called "foo", you already know the answer is "foo" (unless there isn't one at all, I suppose). But I can imagine that you might want to rename the "foo" argument to "bar", without first having to find out where it is.
>
> If you abstract out the "look up by index or name" functionality as I suggest, then this wouldn't even be difficult to implement – just add another call to the same function.

not an issue of implementation, the only case where to use`!setdagname` by argument name should be renaming an argument. However, I would add that for completeness. Thanks for the suggestion.


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