[all-commits] [llvm/llvm-project] 60b8b3: [mlir][IR] Make `replaceOp` / `replaceAllUsesWith`...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Thu Feb 22 06:55:26 PST 2024
Branch: refs/heads/users/matthias-springer/replace_op_api
Home: https://github.com/llvm/llvm-project
Commit: 60b8b3dc0605f0b49c00821db295dbf3ece7a021
https://github.com/llvm/llvm-project/commit/60b8b3dc0605f0b49c00821db295dbf3ece7a021
Author: Matthias Springer <springerm at google.com>
Date: 2024-02-22 (Thu, 22 Feb 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