diff options
| author | River Riddle <riverriddle@google.com> | 2019-12-16 12:09:14 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-16 12:09:45 -0800 |
| commit | ab610e8a9961fb19f396ee4c2065261bd12b0013 (patch) | |
| tree | 3cbddea3cc7069c844d74ba124a776e04e3047ce /mlir/include | |
| parent | ed749b7689702587d369e241c596808f5d6b92cb (diff) | |
| download | bcm5719-llvm-ab610e8a9961fb19f396ee4c2065261bd12b0013.tar.gz bcm5719-llvm-ab610e8a9961fb19f396ee4c2065261bd12b0013.zip | |
Insert signature-converted blocks into a region with a parent operation.
This keeps the IR valid and consistent as it is expected that each block should have a valid parent region/operation. Previously, converted blocks were kept floating without a valid parent region.
PiperOrigin-RevId: 285821687
Diffstat (limited to 'mlir/include')
| -rw-r--r-- | mlir/include/mlir/IR/Block.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mlir/include/mlir/IR/Block.h b/mlir/include/mlir/IR/Block.h index a36ecdd9e37..2ef7bf392f4 100644 --- a/mlir/include/mlir/IR/Block.h +++ b/mlir/include/mlir/IR/Block.h @@ -56,10 +56,14 @@ public: /// Return if this block is the entry block in the parent region. bool isEntryBlock(); - /// Insert this block (which must not already be in a function) right before + /// Insert this block (which must not already be in a region) right before /// the specified block. void insertBefore(Block *block); + /// Unlink this block from its current region and insert it right before the + /// specific block. + void moveBefore(Block *block); + /// Unlink this Block from its parent region and delete it. void erase(); |

