[all-commits] [llvm/llvm-project] 57609f: [MLIR][MemRef] Avoid returning ReallocOp from find...

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Tue Jul 11 14:33:45 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 57609fb6dde1fce5dfa850816b964c8b5fda65a3
  Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M mlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp
    M mlir/test/Dialect/Bufferization/canonicalize.mlir

  Log Message:
  [MLIR][MemRef] Avoid returning ReallocOp from findDealloc

This diff makes findDealloc return nullopt if the list of users contains "realloc".
Fixes https://github.com/llvm/llvm-project/issues/60726
(In particular, in SimplifyClones (uses findDealloc) treating "realloc" as "dealloc"
breaks the assumption that "dealloc" has no users)

Test plan: ninja check-mlir check-all

Differential revision: https://reviews.llvm.org/D154892

More information about the All-commits mailing list