[all-commits] [llvm/llvm-project] 613946: [mlir] Ignore effects on allocated results when ch...
zero9178 via All-commits
all-commits at lists.llvm.org
Tue Jul 19 02:17:32 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61394636f099ebba3d3dc7e3382a1e63f751b911
https://github.com/llvm/llvm-project/commit/61394636f099ebba3d3dc7e3382a1e63f751b911
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M mlir/lib/Interfaces/SideEffectInterfaces.cpp
M mlir/test/Transforms/canonicalize-dce.mlir
M mlir/test/lib/Dialect/Test/TestOps.td
Log Message:
-----------
[mlir] Ignore effects on allocated results when checking whether the op is trivially dead.
In the current state, this is only special cased for Allocation effects, but any effects on results allocated by the operation may be ignored when checking whether the op may be removed, as none of them are possible to be observed if the result is unused.
A use case for this is for IRs for languages which always initialize on allocation. To correctly model such operations, a Write as well as an Allocation effect should be placed on the result. This would prevent the Op from being deleted if unused however. This patch fixes that issue.
Differential Revision: https://reviews.llvm.org/D129854
More information about the All-commits
mailing list