Issue #55173
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/IR/OpImplementation.h | ||
---|---|---|
939 | I'd recommend passing the lambda inline instead of naming it. I also learned a trick where "emplace_back" will add a new empty entry to a vector and return a reference to it. This should allow you to turn this into: return parseCommaSeparatedList([&]() { return parseType(result.emplace_back()); }); | |
mlir/lib/Dialect/Affine/IR/AffineOps.cpp | ||
3490 | These parser hooks support chaining with ||, plz give this a try: if (parser.parseCommaSeparatedList(parseOperands)) || parser.parseRParen()) return failure(); | |
mlir/lib/Dialect/DLTI/DLTI.cpp | ||
295 | Please use the same things above - you can move this inline, and use the emplace_back inline. |
Nice, thank you! A couple more suggestions above.
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp | ||
---|---|---|
557–559 | You can simplify this one to "return parser.parseOperand(...);" | |
3093 | I /think/ you can use "return parser.emitError(...)" because the result converts to failure already. | |
3099 | here and below too (if I'm right) |
I'd recommend passing the lambda inline instead of naming it. I also learned a trick where "emplace_back" will add a new empty entry to a vector and return a reference to it. This should allow you to turn this into: