[ValueLattice] Add move constructor (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 17 Apr 2020 17:15:01 +0000 (19:15 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 20 Apr 2020 16:32:38 +0000 (18:32 +0200)
commitb3f5472c2b9c8cf99239a9ac655555e9f0ba9e5d
treed6b933fc9a5de4be67b308cc0012f12a3fbad75a
parent54d01cbc15eabb3daf4911d7bc935082846ac271
[ValueLattice] Add move constructor (NFC)

Following the rule of five, declare move constructor and move
assignment operator for ValueLatticeElement. This allows moving
the ConstantRange rather than copying it.

This does not matter in most cases, where we're dealing with
APInts <= 64 bits. It does avoid unnecessary copies of allocations
for larger APInts.

Additionally we change the implementation approach to make the
copy/move assignment operators make use of the copy/move constructors,
rather than the other way around. The constructors are the more
primitive operations.

Differential Revision: https://reviews.llvm.org/D78425
llvm/include/llvm/Analysis/ValueLattice.h