Merged
Conversation
This is a dedicated attribute usable as a nearly drop-in replacement for a dictionary attribute of expression lists. It uses `WaveSymbolAttr` instances as keys instead of strings and by design preserves the order in which keys appear. Usage of this attribute will be introduced progressively in separate commits. Signed-off-by: Alex Zinenko <git@ozinenko.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces WaveSymbolMappingAttr, a new ordered mapping attribute for the Wave dialect that maps WaveSymbolAttr keys to WaveExprListAttr values while preserving insertion order (intended as an ordered alternative to dictionary-based attributes). It also adds a small test-only op and MLIR tests to validate printing/parsing, ordering, and verifier behavior.
Changes:
- Add
WaveSymbolMappingAttrdefinition (TableGen) plus custom parse/print, verification, and helper APIs (verifyResultCount,lookup). - Add
water_test.wave_symbol_mappingtest op with a verifier that checks a uniform result count across mapped expr lists. - Add positive/negative MLIR tests for parsing/printing, ordering preservation, duplicate keys, and result-count verification.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
water/include/water/Dialect/Wave/IR/WaveAttrs.td |
Declares WaveSymbolMappingAttr and its public helper methods. |
water/lib/Dialect/Wave/IR/WaveAttrs.cpp |
Implements custom assembly format parsing/printing and verification for the new attribute. |
water/test/lib/Dialect/WaterTestDialect.td |
Adds a dummy op to hold/verify WaveSymbolMappingAttr in tests. |
water/test/lib/Dialect/WaterTestDialect.cpp |
Implements the dummy op verifier using verifyResultCount. |
water/test/Dialect/Wave/attr-type.mlir |
Adds roundtrip/ordering tests for #wave.symbol_mapping. |
water/test/Dialect/Wave/attr-type-invalid.mlir |
Adds negative tests for duplicate keys and mismatched expr_list result counts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
martin-luecke
approved these changes
Feb 20, 2026
Contributor
martin-luecke
left a comment
There was a problem hiding this comment.
Nothing really to add beyond what copilot wrote.
IMO this could have been combined with #928
Signed-off-by: Alex Zinenko <git@ozinenko.com>
Contributor
Author
Contributor
Author
|
Numeric issue is irreleavnt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a dedicated attribute usable as a nearly drop-in replacement for a dictionary attribute of expression lists. It uses
WaveSymbolAttrinstances as keys instead of strings and by design preserves the order in which keys appear.Usage of this attribute will be introduced progressively in separate commits.
Partially supersedes #730