These methods are very useful outside of AllocLikeOpLowering.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp | ||
---|---|---|
934 | I would prefer for this method to be split into two pieces getMemRefDescriptorSizes that gives you the SmallVector of sizes. and getMemRefDescriptorSizeInBytes that takes the sizes and gives you the Value for the size. Longer term, we could then reuse the former in more places. | |
937 | Making this one reused makes sense for a private function but not for a public API I think. |
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp | ||
---|---|---|
942 | Is this actually correct? If the memref is 0d, it should have no sizes. I think this was convenient for the later computation of the byte size only. | |
946 | Should this just return the value and create its own one? I think it is better to not share the one constant. They are cheap and cse will fix it. And even if not, they don't turn into code anyway. |
I would prefer for this method to be split into two pieces
getMemRefDescriptorSizes that gives you the SmallVector of sizes.
and
getMemRefDescriptorSizeInBytes that takes the sizes and gives you the Value for the size.
Longer term, we could then reuse the former in more places.