[all-commits] [llvm/llvm-project] 65684d: [mlir][ods] Rework how transitive use of deprecate...
zero9178 via All-commits
all-commits at lists.llvm.org
Sun Jan 15 09:29:05 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 65684dc6a79315bb6ca9beb8e079775593c41fa0
https://github.com/llvm/llvm-project/commit/65684dc6a79315bb6ca9beb8e079775593c41fa0
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2023-01-15 (Sun, 15 Jan 2023)
Changed paths:
M mlir/lib/Tools/mlir-tblgen/MlirTblgenMain.cpp
A mlir/test/mlir-tblgen/deprecation-transitive.td
Log Message:
-----------
[mlir][ods] Rework how transitive use of deprecated defs are handled
The code currently attempting to recursively find uses of a deprecated def has a few deficiences:
* It recurses into all def uses. This is problematic as it also causes any users of a def using a deprecated def, to be considered deprecated, causing a transitive chain of deprecated defs (see `H_ButNotTransitivelyInNonAnonymousDef` in test case for reproducer)
* It did not recurse into other kinds of fields, such as list and DAGs
This patch fixes the issue by reworking the code to properly recurse into inits and not to recurse into def uses unless they are anonymous defs. Since inits (including DAG, List and anonymous defs) are uniqued, the memoization is kept and remains profitable.
Differential Revision: https://reviews.llvm.org/D141794
More information about the All-commits
mailing list