Skip to content
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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zero9178
Copy link
Contributor

@zero9178 zero9178 commented May 21, 2024

The BitEnumAttribute is meant to be the equivalent of BitEnumAttr in MLIR: https://github.com/llvm/llvm-project/blob/e67f2cc3fc38cec2041cfb197ac4688ed3d16e7e/mlir/include/mlir/IR/EnumAttr.td#L266
It 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.

@zero9178 zero9178 added the help wanted Extra attention is needed label May 21, 2024
Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.61%. Comparing base (6252a84) to head (8b06f3f).

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.
📢 Have feedback on the report? Share it here.

xdsl/ir/core.py Outdated Show resolved Hide resolved
@superlopuh
Copy link
Member

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

@AntonLydike AntonLydike changed the title [Please-take-over] core: add BitEnumAttribute [Please-take-over] core: Add BitEnumAttribute May 22, 2024
@math-fehr
Copy link
Collaborator

Currently taking over, I'm splitting this PR in multiple ones as well

@math-fehr math-fehr changed the base branch from main to fehr/parse_enum_value June 7, 2024 14:43
Base automatically changed from fehr/parse_enum_value to main June 11, 2024 16:05
@superlopuh
Copy link
Member

@math-fehr what's the latest on this?

@math-fehr
Copy link
Collaborator

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.
If someone wants to take over, please do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants