AllocOp is updated in normalizeMemref(AllocOp allocOp), but, when the
AllocOp has alignment attribute, it was ignored and updated AllocOp
does not have alignment attribute. This patch fixes it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Transforms/Utils/Utils.cpp | ||
---|---|---|
449 | Nit: Please terminate comment with a period. They also have to be complete sentences. | |
450–455 | The following will instead work: auto newAlloc = b.create<AllocOp>(allocOp.getLoc(), newMemRefType, llvm::None, allocOp.alignmentAttr()); You don't need value() - it only works for static memrefs. If one extends this for dynamic memrefs, one simply can't pass allocOp.value() here. | |
mlir/test/Transforms/memref-normalize.mlir | ||
150 | No need of %{{.*}} = |
mlir/test/Transforms/memref-normalize.mlir | ||
---|---|---|
150 | Can you use CHECK-NEXT here? |
mlir/test/Transforms/memref-normalize.mlir | ||
---|---|---|
150 | Do you mean I need to just replace CHECK with CHECK-NEXT ? Yes, I can do, but why CHECK-NEXT is better? |
@bondhugula Thanks for your review! I reflected your comments.
I think I don't have right to land this patch. Could you land this if you don't have additional comments?
mlir/test/Transforms/memref-normalize.mlir | ||
---|---|---|
150 | CHECK-NEXT would be more stringent - not allowing anything else in between, which is the case here since you don't expect anything in between. |
mlir/test/Transforms/memref-normalize.mlir | ||
---|---|---|
150 | I see. Thanks! |
Nit: Please terminate comment with a period. They also have to be complete sentences.