-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Please-take-over] core: Add BitEnumAttribute
#2617
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2617 +/- ##
==========================================
- Coverage 89.62% 89.61% -0.01%
==========================================
Files 358 358
Lines 45676 45702 +26
Branches 6888 6889 +1
==========================================
+ Hits 40935 40957 +22
- Misses 3687 3689 +2
- Partials 1054 1056 +2 ☔ View full report in Codecov by Sentry. |
Ah, @zero9178, now it's just the formatting failing, should be easy enough to get working locally for you, then should be good to open up for review when you're ready |
BitEnumAttribute
BitEnumAttribute
8b06f3f
to
1391b8b
Compare
Currently taking over, I'm splitting this PR in multiple ones as well |
@math-fehr what's the latest on this? |
Sorry about this. I merged part of it (the parsing for enums) but now I don't have time anymore to continue it in the next month. |
The
BitEnumAttribute
is meant to be the equivalent ofBitEnumAttr
in MLIR: https://github.com/llvm/llvm-project/blob/e67f2cc3fc38cec2041cfb197ac4688ed3d16e7e/mlir/include/mlir/IR/EnumAttr.td#L266It allows defining an attribute which in abstract is a set of flag values where each flag value is defined within an enum.
The base class is meant to be easy to use like
EnumAttribute
and automatically define suitable parsers and printers.For an in-tree user that is converted by this PR see
FastMathAttr
in the LLVM and arith dialects.