[IRMemoryMap] Shrink Allocation and make it move-only (NFC)
authorVedant Kumar <vsk@apple.com>
Wed, 8 Aug 2018 21:26:49 +0000 (21:26 +0000)
committerVedant Kumar <vsk@apple.com>
Wed, 8 Aug 2018 21:26:49 +0000 (21:26 +0000)
commitf71dd3445b4dcbe8bde277185b6bb423ea30e323
tree7018e9493b586481724e3ff883b92e0b5629c8e1
parent3e8820a01e73066f8571ba6ce093c3f4c59b10d4
[IRMemoryMap] Shrink Allocation and make it move-only (NFC)

Profiling data show that Allocation::operator= is hot (see the data
attached to the Phab review).

Reorder a few fields within Allocation to avoid implicit structure
padding and shrink the structure. This should make copies a bit cheaper.

Also, given that an Allocation contains a std::vector (by way of
DataBufferHeap), it's preferable to make it move-only instead of
permitting expensive copies. As an added benefit this allows us to have
a single Allocation constructor instead of two.

Differential Revision: https://reviews.llvm.org/D50271

llvm-svn: 339290
lldb/include/lldb/Expression/IRMemoryMap.h
lldb/source/Expression/IRMemoryMap.cpp