[all-commits] [llvm/llvm-project] c27d49: [mlir][IR] Make `replaceOp` / `replaceAllUsesWith`...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Thu Feb 22 07:04:28 PST 2024
Branch: refs/heads/users/matthias-springer/replace_op_api
Home: https://github.com/llvm/llvm-project
Commit: c27d49a868449ddb85b5740f9e415895191806f2
https://github.com/llvm/llvm-project/commit/c27d49a868449ddb85b5740f9e415895191806f2
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