-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[mlir][IR] Deprecate OpBuilder::create
in favor of free functions
#164649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-flang-openmp @llvm/pr-subscribers-mlir Author: Jakub Kuderski (kuhar) ChangesThese have been soft-deprecated since July: https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339 Add a deprecation attribute to prevent new uses from creeping in. Full diff: https://github.com/llvm/llvm-project/pull/164649.diff 1 Files Affected:
diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h
index 9205f16f97bbb..3ba6818204ba0 100644
--- a/mlir/include/mlir/IR/Builders.h
+++ b/mlir/include/mlir/IR/Builders.h
@@ -502,6 +502,7 @@ class OpBuilder : public Builder {
public:
/// Create an operation of specific op type at the current insertion point.
template <typename OpTy, typename... Args>
+ [[deprecated("Use OpTy::create instead")]]
OpTy create(Location location, Args &&...args) {
OperationState state(location,
getCheckRegisteredInfo<OpTy>(location.getContext()));
@@ -517,9 +518,9 @@ class OpBuilder : public Builder {
/// the results of the operation.
///
/// Note: This performs opportunistic eager folding during IR construction.
- /// The folders are designed to operate efficiently on canonical IR, which
+ /// The folders are designed to operate efficiently on canonical IR, which
/// this API does not enforce. Complete folding isn't only expected in the
- /// context of canonicalization which intertwine folders with pattern
+ /// context of canonicalization which intertwine folders with pattern
/// rewrites until fixed-point.
template <typename OpTy, typename... Args>
void createOrFold(SmallVectorImpl<Value> &results, Location location,
|
@llvm/pr-subscribers-mlir-core Author: Jakub Kuderski (kuhar) ChangesThese have been soft-deprecated since July: https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339 Add a deprecation attribute to prevent new uses from creeping in. Full diff: https://github.com/llvm/llvm-project/pull/164649.diff 1 Files Affected:
diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h
index 9205f16f97bbb..3ba6818204ba0 100644
--- a/mlir/include/mlir/IR/Builders.h
+++ b/mlir/include/mlir/IR/Builders.h
@@ -502,6 +502,7 @@ class OpBuilder : public Builder {
public:
/// Create an operation of specific op type at the current insertion point.
template <typename OpTy, typename... Args>
+ [[deprecated("Use OpTy::create instead")]]
OpTy create(Location location, Args &&...args) {
OperationState state(location,
getCheckRegisteredInfo<OpTy>(location.getContext()));
@@ -517,9 +518,9 @@ class OpBuilder : public Builder {
/// the results of the operation.
///
/// Note: This performs opportunistic eager folding during IR construction.
- /// The folders are designed to operate efficiently on canonical IR, which
+ /// The folders are designed to operate efficiently on canonical IR, which
/// this API does not enforce. Complete folding isn't only expected in the
- /// context of canonicalization which intertwine folders with pattern
+ /// context of canonicalization which intertwine folders with pattern
/// rewrites until fixed-point.
template <typename OpTy, typename... Args>
void createOrFold(SmallVectorImpl<Value> &results, Location location,
|
No objections here |
I forgot I also need to update flang and clang -- will send out separate PRs for these |
See https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339. I plan to mark these as deprecated in #164649.
…657) See https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339. I plan to mark these as deprecated in llvm/llvm-project#164649.
See https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339. I plan to make these deprecated in #164649.
49ff0d7
to
6a20de7
Compare
Rebased. Clang and Flang changes landed. |
Fixed new uses in OpenMP... |
…(#164656) See https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339. I plan to make these deprecated in llvm/llvm-project#164649.
These have been soft-deprecated since July: https://discourse.llvm.org/t/psa-opty-create-now-with-100-more-tab-complete/87339
Add a deprecation attribute to prevent new uses from creeping in.