- Change findDealloc() to return Optional<Operation *> and return None if > 1 dealloc is associated with the given alloc.
- Add findDeallocs() to return all deallocs associated with the given alloc.
- Fix current uses of findDealloc() to bail out if > 1 dealloc is found.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp | ||
---|---|---|
544 | I'd check the first before calling the second findDealloc: early exit before doing useless work :) | |
mlir/lib/Dialect/MemRef/Utils/MemRefUtils.cpp | ||
39 | When I saw the .h, I thought you were keeping this API for efficiency. But seeing the implementation it clearly isn't :) Is this separate API really worth it? |
mlir/lib/Dialect/MemRef/Utils/MemRefUtils.cpp | ||
---|---|---|
39 | All current uses actually use the second API. May be I should remove the first API (it can be added later when someone needs to look at all deallocations) and make the second one efficient. |
I'd check the first before calling the second findDealloc: early exit before doing useless work :)