Add utility 'replaceAllUsesWith' methods to Operation.
authorRiver Riddle <riverriddle@google.com>
Wed, 7 Aug 2019 20:48:19 +0000 (13:48 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 7 Aug 2019 20:48:52 +0000 (13:48 -0700)
commit8089f937469dd725354d97b60596672ba59fd1fd
tree0466695f9fdd705e2f3517985a488ba88a0279ee
parenta477fbaf40b64e758bd6e34aebafb527438f2d7f
Add utility 'replaceAllUsesWith' methods to Operation.

These methods will allow replacing the uses of results with an existing operation, with the same number of results, or a range of values. This removes a number of hand-rolled result replacement loops and simplifies replacement for operations with multiple results.

PiperOrigin-RevId: 262206600
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/Operation.h
mlir/lib/IR/PatternMatch.cpp
mlir/lib/Transforms/CSE.cpp
mlir/lib/Transforms/MemRefDataFlowOpt.cpp
mlir/lib/Transforms/Utils/Utils.cpp