[all-commits] [llvm/llvm-project] d7daa6: [mlir][tblgen] Emit deprecation warning if `kEmitR...
zero9178 via All-commits
all-commits at lists.llvm.org
Wed Jan 18 01:45:36 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d7daa6364cfded615991585b7f8ed7aff66cb7be
https://github.com/llvm/llvm-project/commit/d7daa6364cfded615991585b7f8ed7aff66cb7be
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2023-01-18 (Wed, 18 Jan 2023)
Changed paths:
M mlir/include/mlir/IR/DialectBase.td
M mlir/include/mlir/IR/OpBase.td
M mlir/lib/TableGen/Dialect.cpp
M mlir/lib/Tools/mlir-tblgen/MlirTblgenMain.cpp
M mlir/test/mlir-tblgen/has-fold-invalid-values.td
Log Message:
-----------
[mlir][tblgen] Emit deprecation warning if `kEmitRawAttributes` is used
As discussed in https://reviews.llvm.org/D140886, emitting a warning if the old API is used may be beneficial to encourage migration to the new fold API.
This reuse the existing `Deprecated` infrastructure within TableGen, and simply marks the `def` for `kEmitRawAttributesFolder` causing a use of it in a record (even if set within a base class) to emit a warning.
Error message as printed in the terminal:
```
Included from C:/llvm-project/mlir/python/mlir/dialects/TensorOps.td:13:
Included from C:/llvm-project/mlir/include\mlir/Dialect/Tensor/IR/TensorOps.td:12:
C:/llvm-project/mlir/include\mlir/Dialect/Tensor/IR/TensorBase.td:14:5: warning: Using deprecated def `kEmitRawAttributesFolder`
def Tensor_Dialect : Dialect {
^
note: 'useFoldAPI' of 'kEmitRawAttributesFolder' (default) has been deprecated and is pending removal. Please switch to 'kEmitFoldAdaptorFolder'. See https://discourse.llvm.org/t/psa-new-improved-fold-method-signature-has-landed-please-update-your-downstream-projects/67618
```
Differential Revision: https://reviews.llvm.org/D141604
More information about the All-commits
mailing list