[PATCH] D51015: [MemorySSA] Make the Updater movable.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 16:55:38 PDT 2018
chandlerc 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) {
----------------
chandlerc wrote:
> george.burgess.iv wrote:
> > 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. :)
> We shouldn't need to write it at all if that worked....
>
> I think the issue is the SmallSet of AssertingVH's?
This does raise the point that as-is, this is a very surprising move constructor.
I'd suggest moving all members somewhat pedantically to make it less surprising. And you might need to clear the actual AssertingVH container after that so that, not sure.
Repository:
rL LLVM
https://reviews.llvm.org/D51015
More information about the llvm-commits
mailing list