[llvm-branch-commits] [mlir] [mlir][Transforms][NFC] Turn op creation into `IRRewrite` (PR #81759)

Jacques Pienaar via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 21 06:27:11 PST 2024


================
@@ -372,7 +368,11 @@ class CreateBlockRewrite : public BlockRewrite {
     auto &blockOps = block->getOperations();
     while (!blockOps.empty())
       blockOps.remove(blockOps.begin());
-    eraseBlock(block);
+    if (block->getParent()) {
----------------
jpienaar wrote:

Nit: eliding braces for simple conditionals is style here.

https://github.com/llvm/llvm-project/pull/81759


More information about the llvm-branch-commits mailing list