Skip to content

Commit ca80408

Browse files
cnb.bsD2OPwAgEAcnb.bsD2OPwAgEA
authored andcommitted
rename mlirApplyPatternsAndFoldGreedilyForOp with mlirApplyPatternsAndFoldGreedilyWithOp
1 parent 1dde449 commit ca80408

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

mlir/include/mlir-c/Rewrite.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ mlirFreezeRewritePattern(MlirRewritePatternSet op);
301301
MLIR_CAPI_EXPORTED void
302302
mlirFrozenRewritePatternSetDestroy(MlirFrozenRewritePatternSet op);
303303

304-
MLIR_CAPI_EXPORTED MlirLogicalResult mlirApplyPatternsAndFoldGreedilyForOp(
304+
MLIR_CAPI_EXPORTED MlirLogicalResult mlirApplyPatternsAndFoldGreedilyWithOp(
305305
MlirOperation op, MlirFrozenRewritePatternSet patterns,
306306
MlirGreedyRewriteDriverConfig);
307307

mlir/lib/Bindings/Python/Rewrite.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
110110
"Applys the given patterns to the given module greedily while folding "
111111
"results.")
112112
.def(
113-
"apply_patterns_and_fold_greedily_for_op",
113+
"apply_patterns_and_fold_greedily_with_op",
114114
[](MlirOperation op, MlirFrozenRewritePatternSet set) {
115-
auto status = mlirApplyPatternsAndFoldGreedilyForOp(op, set, {});
115+
auto status = mlirApplyPatternsAndFoldGreedilyWithOp(op, set, {});
116116
if (mlirLogicalResultIsFailure(status))
117117
// FIXME: Not sure this is the right error to throw here.
118118
throw nb::value_error("pattern application failed to converge");

mlir/lib/CAPI/Transforms/Rewrite.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ mlirApplyPatternsAndFoldGreedily(MlirModule op,
295295
}
296296

297297
MlirLogicalResult
298-
mlirApplyPatternsAndFoldGreedilyForOp(MlirOperation op,
299-
MlirFrozenRewritePatternSet patterns,
300-
MlirGreedyRewriteDriverConfig) {
298+
mlirApplyPatternsAndFoldGreedilyWithOp(MlirOperation op,
299+
MlirFrozenRewritePatternSet patterns,
300+
MlirGreedyRewriteDriverConfig) {
301301
return wrap(mlir::applyPatternsGreedily(unwrap(op), *unwrap(patterns)));
302302
}
303303

mlir/test/python/pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self):
5858

5959
def run(self, m):
6060
frozen = PDLModule(pdl_module).freeze()
61-
apply_patterns_and_fold_greedily_for_op(m, frozen)
61+
apply_patterns_and_fold_greedily_with_op(m, frozen)
6262

6363
module = ModuleOp.parse(
6464
r"""

0 commit comments

Comments
 (0)