- Verify that attributes parsed using a custom parser do not have duplicates.
- If there are duplicated in the attribute dictionary in the input, they get caught during the dictionary parsing.
- This check verifies that there is no duplication between the parsed dictionary and any attributes that might be added by the custom parser (or when the custom parsing code adds duplicate attributes).
- Fixes https://bugs.llvm.org/show_bug.cgi?id=48025
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Why place this in the declarative parser/printer? This(i.e. duplicate attributes) looks like it could apply to any custom op parser, declarative or not.
Comment Actions
By custom op parser, you mean ops that implement their own print and parse functions, right? What do you suggest would be a good place to handle this? In OpBuilder::createOperation() might be too late?
Comment Actions
Yeah. Hmm, can we check here(https://github.com/llvm/llvm-project/blob/72ddd559b8aafef402091f8e192e025022e4ebef/mlir/lib/Parser/Parser.cpp#L848)? If the parser didn't emit an error, we should be able to check if the operation state has duplicate attributes.
nit: name within the given array