Skip to content

Commit 6a20de7

Browse files
committed
[mlir] Deprecate OpBuilder::create in favor of free functions
1 parent 25a915a commit 6a20de7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mlir/include/mlir/IR/Builders.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ class OpBuilder : public Builder {
502502
public:
503503
/// Create an operation of specific op type at the current insertion point.
504504
template <typename OpTy, typename... Args>
505+
[[deprecated("Use OpTy::create instead")]]
505506
OpTy create(Location location, Args &&...args) {
506507
OperationState state(location,
507508
getCheckRegisteredInfo<OpTy>(location.getContext()));
@@ -517,9 +518,9 @@ class OpBuilder : public Builder {
517518
/// the results of the operation.
518519
///
519520
/// Note: This performs opportunistic eager folding during IR construction.
520-
/// The folders are designed to operate efficiently on canonical IR, which
521+
/// The folders are designed to operate efficiently on canonical IR, which
521522
/// this API does not enforce. Complete folding isn't only expected in the
522-
/// context of canonicalization which intertwine folders with pattern
523+
/// context of canonicalization which intertwine folders with pattern
523524
/// rewrites until fixed-point.
524525
template <typename OpTy, typename... Args>
525526
void createOrFold(SmallVectorImpl<Value> &results, Location location,

0 commit comments

Comments
 (0)