Skip to content

Comments

generalize WaveSymbolMappingAttr to support arbitrary attributes#928

Merged
ftynse merged 2 commits intomainfrom
users/ftynse/generalize-symbol-mapping
Feb 20, 2026
Merged

generalize WaveSymbolMappingAttr to support arbitrary attributes#928
ftynse merged 2 commits intomainfrom
users/ftynse/generalize-symbol-mapping

Conversation

@ftynse
Copy link
Contributor

@ftynse ftynse commented Feb 19, 2026

This will be used to make index mappings ordered

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 WaveSymbolMappingAttr to accept any attribute type as values
  • Introduced WaveSymbolMappingAttrOf and WaveSymbolMappingToNResultExprListAttr for 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.

Copy link
Contributor

@martin-luecke martin-luecke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Pls fix PR title arbirary → 'arbitrary` or just the future commit message

Base automatically changed from users/ftynse/symbol-mapping-attr to main February 20, 2026 12:45
@ftynse ftynse changed the title generalize WaveSymbolMappingAttr to support arbirary attributes generalize WaveSymbolMappingAttr to support arbitrary attributes Feb 20, 2026
@ftynse ftynse force-pushed the users/ftynse/generalize-symbol-mapping branch from 63db8be to dc39c28 Compare February 20, 2026 13:07
Signed-off-by: Alex Zinenko <git@ozinenko.com>
Signed-off-by: Alex Zinenko <git@ozinenko.com>
@ftynse ftynse force-pushed the users/ftynse/generalize-symbol-mapping branch from dc39c28 to 04d2dd9 Compare February 20, 2026 15:16
@ftynse ftynse merged commit 3e5de70 into main Feb 20, 2026
15 checks passed
@ftynse ftynse deleted the users/ftynse/generalize-symbol-mapping branch February 20, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants