[PATCH] D51015: [MemorySSA] Make the Updater movable.

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 16:53:36 PDT 2018


george.burgess.iv added inline comments.


================
Comment at: include/llvm/Analysis/MemorySSAUpdater.h:73
   MemorySSAUpdater(MemorySSA *MSSA) : MSSA(MSSA) {}
+  MemorySSAUpdater(MemorySSAUpdater &&MSSAU) : MSSA(MSSAU.MSSA) {}
+  MemorySSAUpdater& operator=(MemorySSAUpdater&& MSSAU) {
----------------
Can we `= default;`? I'd imagine the associated Small* data structures are really cheap to move/etc. if they're empty.

If not, that's sad, but OK, this works. :)


================
Comment at: include/llvm/Analysis/MemorySSAUpdater.h:74
+  MemorySSAUpdater(MemorySSAUpdater &&MSSAU) : MSSA(MSSAU.MSSA) {}
+  MemorySSAUpdater& operator=(MemorySSAUpdater&& MSSAU) {
+    MSSA = MSSAU.MSSA;
----------------
nit: please clang-format


Repository:
  rL LLVM

https://reviews.llvm.org/D51015





More information about the llvm-commits mailing list