[MLIR] Add PatternRewriter::mergeBlockBefore() to merge a block in the middle of...
authorRahul Joshi <jurahul@google.com>
Wed, 19 Aug 2020 23:07:42 +0000 (16:07 -0700)
committerRahul Joshi <jurahul@google.com>
Wed, 19 Aug 2020 23:24:59 +0000 (16:24 -0700)
commit9c7b0c4aa5ebe5ec9fef9ca18bef0c3a916b0fca
tree0e0a1b0ebc39629c94a99ba578632ac385074bb3
parent724f570ad25568acc3a33dcdce9cadd776de2382
[MLIR] Add PatternRewriter::mergeBlockBefore() to merge a block in the middle of another block.

- This utility to merge a block anywhere into another one can help inline single
  block regions into other blocks.
- Modified patterns test to use the new function.

Differential Revision: https://reviews.llvm.org/D86251
mlir/include/mlir/IR/Block.h
mlir/include/mlir/IR/PatternMatch.h
mlir/lib/IR/Block.cpp
mlir/lib/IR/PatternMatch.cpp
mlir/test/lib/Dialect/Test/TestPatterns.cpp