[all-commits] [llvm/llvm-project] 89bffa: [mlir][IR] Make `replaceOp` / `replaceAllUsesWith`...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Fri Feb 23 00:34:03 PST 2024
Branch: refs/heads/users/matthias-springer/replace_op_api
Home: https://github.com/llvm/llvm-project
Commit: 89bffa192f8d2d8dd68ef2642bbe14bb74b07ec3
https://github.com/llvm/llvm-project/commit/89bffa192f8d2d8dd68ef2642bbe14bb74b07ec3
Author: Matthias Springer <springerm at google.com>
Date: 2024-02-23 (Fri, 23 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