-
Notifications
You must be signed in to change notification settings - Fork 146
[CIR] Streamline creation of mlir::IntegerAttr
s using mlir::Builder
#1645
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
f31f26d
to
3e78c65
Compare
@bcardosolopes I believe
mlir::IntegerAttr is not correct as it disallows non-core types, but at this location it is created with cir::IntType .
It is probably nowhere exercised as making it NYI did not crashed any test. Should I make it NYI for now? |
If it has no users we should probably just delete for now. |
- Uses getI<bitwidth>IntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Removes duplicit type parameters, that are inferred from mlir::IntegerAttr. This mirrors incubator changes from llvm/clangir#1645 (comment)
- Uses getI<bitwidth>IntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Removes duplicit type parameters, that are inferred from mlir::IntegerAttr. This mirrors incubator changes from llvm/clangir#1645 (comment)
…141830) - Uses getI<bitwidth>IntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Removes duplicit type parameters, that are inferred from mlir::IntegerAttr. This mirrors incubator changes from llvm/clangir#1645 (comment)
…::Builder (#141830) - Uses getI<bitwidth>IntegerAttr builder method instead of explicit attribute and its type creation. - Adds few helper functions `getAlignmentAttr` to build alignment representing mlir::IntegerAttr. - Removes duplicit type parameters, that are inferred from mlir::IntegerAttr. This mirrors incubator changes from llvm/clangir#1645 (comment)
The current implementation incorrectly uses `mlir::IntegerAttr::get` with the unsupported type `cir::IntType`, which is not compatible and was never tested. As discussed in PR #1645, this is to be marked as NYI until a proper implementation is provided.
getI<bitwidth>IntegerAttr
builder method instead of explicit attribute and its type creation.getAlignmentAttr
to build alignment representingmlir::IntegerAttr
.mlir::IntegerAttr
.