Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp | ||
---|---|---|
2504 | Are these patterns sorted alphabetically/can they be? | |
2533 | nit: Move some of these to temporary variables. The nesting is a bit awkward. | |
2659 | This breaks the ordering. | |
mlir/lib/Dialect/StandardOps/Ops.cpp | ||
2772 | Please use the declarative assembly form instead: Should be something like: let assemblyFormat = "$memref attr-dict `:` type($memref)"; | |
2789 | Why is the alignment not specified as an argument in ODS? That would autogenerate a lot of this for you automatically; builders, verification, etc. |
Thanks for pushing on this. Having alignment attribute as an ODS argument looks like it would remove a bunch of boilerplate for you.
mlir/include/mlir/Dialect/StandardOps/Ops.td | ||
---|---|---|
1654 | Can you rather add alignment attribute as ODS argument, i.e. (ins AnyMemRef:$memref, I32Attr align) ? This will remove the need for a custom builder, and give you an auto-generated align() instead of hand-written getAlignment(). | |
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp | ||
2504 | They are not ordered, AFAIK. We should do it as a separate cleanup. | |
mlir/lib/Dialect/StandardOps/Ops.cpp | ||
2772 | Have you considered a non-dictionary syntax: assume_align 64, %memref ? This should be also possible with declarative assembly. | |
2789 | I made the same comment above, +1! |
Done. Used ODS and assemblyFormat syntax. My brain didn't wire up to the simple and new stuff. Thanks!
Thanks!
My brain didn't wire up to the simple and new stuff.
This is also why we have code review, the project is too big for one person to keep track of all the new shiny features. (Except River maybe).
Can you rather add alignment attribute as ODS argument, i.e. (ins AnyMemRef:$memref, I32Attr align) ? This will remove the need for a custom builder, and give you an auto-generated align() instead of hand-written getAlignment().