[all-commits] [llvm/llvm-project] 5074d5: [mlir][IR] Make `replaceOp` / `replaceAllUsesWith`...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Wed Mar 6 17:08:53 PST 2024
Branch: refs/heads/users/matthias-springer/replace_op_api
Home: https://github.com/llvm/llvm-project
Commit: 5074d55305ea160a145567234cda4e25a7644324
https://github.com/llvm/llvm-project/commit/5074d55305ea160a145567234cda4e25a7644324
Author: Matthias Springer <springerm at google.com>
Date: 2024-03-07 (Thu, 07 Mar 2024)
Changed paths:
M mlir/include/mlir/IR/PatternMatch.h
M mlir/include/mlir/Transforms/DialectConversion.h
M mlir/lib/Dialect/Linalg/Transforms/DecomposeLinalgOps.cpp
M mlir/lib/Dialect/Linalg/Utils/Utils.cpp
M mlir/lib/IR/PatternMatch.cpp
M mlir/lib/Transforms/Utils/DialectConversion.cpp
M mlir/lib/Transforms/Utils/RegionUtils.cpp
M mlir/test/lib/Dialect/Test/TestPatterns.cpp
Log Message:
-----------
[mlir][IR] Make `replaceOp` / `replaceAllUsesWith` API consistent
* `replaceOp` replaces all uses of the original op and erases the old op.
* `replaceAllUsesWith` replaces all uses of the original op/value/block. It does not erase any IR.
This commit renames `replaceOpWithIf` to `replaceUsesWithIf`. `replaceOpWithIf` was a misnomer because the function never erases the original op. Similarly, `replaceOpWithinBlock` is renamed to `replaceUsesWithinBlock`.
Also improve comments.
BEGIN_PUBLIC
No public commit message needed for presubmit.
END_PUBLIC
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list