-
Notifications
You must be signed in to change notification settings - Fork 186
[CIR] Refactor IntType constraints #1593
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Few questions remains:
|
5b17612 to
a8a9696
Compare
a8a9696 to
04010e1
Compare
Yes - looks like we forgot to update. If it's possible to add one test for this that'd be great too.
Yes, those instructions are known to work with the "primitive" sizes, but it's not clear whether they work for arbitrary int sizes (or that they can be lowered or have folders working, etc), so I'd rather be on the safe side - have you seen anything different while investigating? I suggest we do not change the semantic in this PR, but do that (with tests) in follow up work. |
bcardosolopes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as needed changes on top of discussion.
I agree, I will fix this to mirror previous semantics, and polish operations in later run through with more testing. Though I suggest to rename |
9f0908b to
fcc777a
Compare
fcc777a to
ccc0b65
Compare
Sounds good, good observation on "complexity"!! |
- Adds `CIR_` prefixes to integer type constraints types to disambiguate their names from other dialects. - Renames `PrimitiveInt` to `CIR_AnyFundamentalIntType` to align more with constrian conventions. - Adds bunch of helper constraint classes to be able to define base types to reduce clutter of necessary type casts. - Reworks constraints to use `CIR_ConfinedType` to avoid repeating validation checks. - Adds `IntOfWidths` variadic bitwidth constraint to reduce boilerplate code needed to handle multi-bitwidth parameters. - Constraints are moved into a separate file, which starts decoupling of constraints and types to remove the cyclic dependency between types and attributes and will eventually help fix several outstanding TODOs. This mirrors incubator changes from llvm/clangir#1593
- Adds `CIR_` prefixes to integer type constraints types to disambiguate their names from other dialects. - Renames `PrimitiveInt` to `CIR_AnyFundamentalIntType` to align more with constrian conventions. - Adds bunch of helper constraint classes to be able to define base types to reduce clutter of necessary type casts. - Reworks constraints to use `CIR_ConfinedType` to avoid repeating validation checks. - Adds `IntOfWidths` variadic bitwidth constraint to reduce boilerplate code needed to handle multi-bitwidth parameters. - Constraints are moved into a separate file, which starts decoupling of constraints and types to remove the cyclic dependency between types and attributes and will eventually help fix several outstanding TODOs. This mirrors incubator changes from llvm/clangir#1593
- Adds `CIR_` prefixes to integer type constraints types to disambiguate their names from other dialects. - Renames `PrimitiveInt` to `CIR_AnyFundamentalIntType` to align more with constrian conventions. - Adds bunch of helper constraint classes to be able to define base types to reduce clutter of necessary type casts. - Reworks constraints to use `CIR_ConfinedType` to avoid repeating validation checks. - Adds `IntOfWidths` variadic bitwidth constraint to reduce boilerplate code needed to handle multi-bitwidth parameters. - Constraints are moved into a separate file, which starts decoupling of constraints and types to remove the cyclic dependency between types and attributes and will eventually help fix several outstanding TODOs. This mirrors incubator changes from llvm/clangir#1593
- Adds `CIR_` prefixes to integer type constraints types to disambiguate their names from other dialects. - Renames `PrimitiveInt` to `CIR_AnyFundamentalIntType` to align more with constrian conventions. - Adds bunch of helper constraint classes to be able to define base types to reduce clutter of necessary type casts. - Reworks constraints to use `CIR_ConfinedType` to avoid repeating validation checks. - Adds `IntOfWidths` variadic bitwidth constraint to reduce boilerplate code needed to handle multi-bitwidth parameters. - Constraints are moved into a separate file, which starts decoupling of constraints and types to remove the cyclic dependency between types and attributes and will eventually help fix several outstanding TODOs. This mirrors incubator changes from llvm/clangir#1593
- Adds `CIR_` prefixes to integer type constraints types to disambiguate their names from other dialects. - Renames `PrimitiveInt` to `CIR_AnyFundamentalIntType` to align more with constrian conventions. - Adds bunch of helper constraint classes to be able to define base types to reduce clutter of necessary type casts. - Reworks constraints to use `CIR_ConfinedType` to avoid repeating validation checks. - Adds `IntOfWidths` variadic bitwidth constraint to reduce boilerplate code needed to handle multi-bitwidth parameters. - Constraints are moved into a separate file, which starts decoupling of constraints and types to remove the cyclic dependency between types and attributes and will eventually help fix several outstanding TODOs. This mirrors incubator changes from llvm/clangir#1593
- Adds `CIR_` prefixes to integer type constraints types to disambiguate their names from other dialects. - Renames `PrimitiveInt` to `CIR_AnyFundamentalIntType` to align more with constraint conventions. - Adds bunch of helper constraint classes to be able to define base types to reduce clutter of necessary type casts. - Reworks constraints to use `CIR_ConfinedType` to avoid repeating validation checks. - Adds `IntOfWidths` variadic bitwidth constraint to reduce boilerplate code needed to handle multi-bitwidth parameters. - Constraints are moved into a separate file, which starts decoupling of constraints and types to remove the cyclic dependency between types and attributes and will eventually help fix several outstanding TODOs.

CIR_prefixes to integer type constraints types to disambiguate their names from other dialects.PrimitiveInttoCIR_AnyFundamentalIntTypeto align more with constrian conventions.CIR_ConfinedTypeto avoid repeating validation checks.IntOfWidthsvariadic bitwidth constraint to reduce boilerplate code needed to handle multi-bitwidth parameters.