[PATCH] D79640: Add Operation::moveAfter

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 12:29:46 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/include/mlir/IR/Operation.h:194
+  /// Unlink this operation from its current block and insert it right after
+  /// `iterator` in the specified block.
+  void moveAfter(Block *block, llvm::iplist<Operation>::iterator iterator);
----------------
IMO we shouldn't have an iterator version here as it is easy to get wrong. `moveAfter(block.begin())` can easily fail if the block is empty. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79640/new/

https://reviews.llvm.org/D79640





More information about the llvm-commits mailing list