[PATCH] D72741: [MLIR] LLVM dialect: Add llvm.atomicrmw
Frank Laub via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 16:32:17 PST 2020
flaub marked 23 inline comments as done.
flaub added inline comments.
================
Comment at: mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp:1448
+
+ result.attributes = attrs;
+ result.addTypes(funcType.getResults());
----------------
ftynse wrote:
> flaub wrote:
> > ftynse wrote:
> > > Nit: just write here directly instead of declaring a new vector of attributes?
> > I don't understand what this comment means.
> >
> > Actually I was attempting to follow the other custom parser impls in this file.
> `parser.parseAttribute(ordering, "ordering", result.attributes)`and so on, using `result.attributes` instead of `attrs`.
The issue is that we need to convert from a string representation to an integer one.
However, I think I've cleaned it up by parsing into a `StringAttr` and then doing the conversion followed by:
```
result.addAttribute("bin_op", binOpAttr);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72741/new/
https://reviews.llvm.org/D72741
More information about the llvm-commits
mailing list