Skip to content

Conversation

@kuhar
Copy link
Member

@kuhar kuhar commented Oct 22, 2025

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.

@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir labels Oct 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 22, 2025

@llvm/pr-subscribers-flang-openmp
@llvm/pr-subscribers-mlir-openmp

@llvm/pr-subscribers-mlir

Author: Jakub Kuderski (kuhar)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/164649.diff

1 Files Affected:

  • (modified) mlir/include/mlir/IR/Builders.h (+3-2)
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, 
@llvmbot
Copy link
Member

llvmbot commented Oct 22, 2025

@llvm/pr-subscribers-mlir-core

Author: Jakub Kuderski (kuhar)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/164649.diff

1 Files Affected:

  • (modified) mlir/include/mlir/IR/Builders.h (+3-2)
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, 
@krzysz00
Copy link
Contributor

No objections here

@kuhar kuhar requested review from dcaballe and ftynse October 22, 2025 15:48
@kuhar
Copy link
Member Author

kuhar commented Oct 22, 2025

I forgot I also need to update flang and clang -- will send out separate PRs for these

@kuhar
Copy link
Member Author

kuhar commented Oct 22, 2025

Clang: #164656
Flang: #164657

@kuhar kuhar force-pushed the deprecate-create-method branch from 49ff0d7 to 6a20de7 Compare October 22, 2025 18:37
@kuhar
Copy link
Member Author

kuhar commented Oct 22, 2025

Rebased. Clang and Flang changes landed.

@kuhar
Copy link
Member Author

kuhar commented Oct 22, 2025

Fixed new uses in OpenMP...

@kuhar kuhar enabled auto-merge (squash) October 22, 2025 18:54
@kuhar kuhar merged commit c0b42ec into llvm:main Oct 22, 2025
12 checks passed
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
…lvm#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.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…lvm#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.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…lvm#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.
Yu-Zhewen added a commit to iree-org/llvm-project that referenced this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants