generalize WaveSymbolMappingAttr to support arbitrary attributes#928
Merged
generalize WaveSymbolMappingAttr to support arbitrary attributes#928
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR generalizes the WaveSymbolMappingAttr to support arbitrary attribute values instead of being restricted to WaveExprListAttr. This enables ordered index mappings and other use cases.
Changes:
- Generalized
WaveSymbolMappingAttrto accept any attribute type as values - Introduced
WaveSymbolMappingAttrOfandWaveSymbolMappingToNResultExprListAttrfor type constraints - Updated test infrastructure to demonstrate multiple mapping types
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| water/include/water/Dialect/Wave/IR/WaveAttrs.td | Updated attribute definition to use generic Attribute type and added constraint helper classes |
| water/include/water/Dialect/Wave/IR/WaveAttrs.h | Added helper functions for validating symbol mapping value types |
| water/lib/Dialect/Wave/IR/WaveAttrs.cpp | Updated parse/verify/lookup methods to work with generic attributes |
| water/test/lib/Dialect/WaterTestDialect.td | Modified test op to use parameterized mapping attributes |
| water/test/lib/Dialect/WaterTestDialect.cpp | Removed custom verification logic (now handled by constraints) |
| water/test/Dialect/Wave/attr-type.mlir | Added test for index mapping functionality |
| water/test/Dialect/Wave/attr-type-invalid.mlir | Updated error tests to reflect new constraint-based validation |
💡 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.
LGTM
Pls fix PR title arbirary → 'arbitrary` or just the future commit message
63db8be to
dc39c28
Compare
Signed-off-by: Alex Zinenko <git@ozinenko.com>
Signed-off-by: Alex Zinenko <git@ozinenko.com>
dc39c28 to
04d2dd9
Compare
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 will be used to make index mappings ordered