[mlir][scf][bufferize][NFC] Lookup buffer using helper function
authorMatthias Springer <springerm@google.com>
Tue, 12 Apr 2022 09:08:11 +0000 (18:08 +0900)
committerMatthias Springer <springerm@google.com>
Tue, 12 Apr 2022 09:09:30 +0000 (18:09 +0900)
commitfa087b43529cfac223432cc5545923fb9c6544af
tree074eec5f167470bd5b00419e0a28babc8f745ddb
parent8d5c8d57c637d898094af323d1888ea5a3364f8c
[mlir][scf][bufferize][NFC] Lookup buffer using helper function

Lookup iter_arg buffers using `lookupBuffer` instead of always creating a new `ToMemrefOp`. Also cast all yielded buffers (if necessary), regardless of whether they are an equivalent buffer or a new allocation.

Note: This should have been part of D123369.

Differential Revision: https://reviews.llvm.org/D123383
mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp