diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-03-30 14:55:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 14:55:51 -0700 |
commit | 247f4c20a1eea63ebe77c64e1681081b5b5de302 (patch) | |
tree | 637f4e5dc108d2eedad3575d8f878b7057077c43 /test/lit/binary/stacky-nn-tuple.test | |
parent | 3995481071fd746ca8b8479d182aad257cab82e2 (diff) | |
download | binaryen-247f4c20a1eea63ebe77c64e1681081b5b5de302.tar.gz binaryen-247f4c20a1eea63ebe77c64e1681081b5b5de302.tar.bz2 binaryen-247f4c20a1eea63ebe77c64e1681081b5b5de302.zip |
[NFC][MemoryPacking] Avoid unnecessarily enormous memory allocations (#4556)
The memory packing pass previously used vectors with a slot for each data
segment to easily map segment indices to lists of "referrers," i.e. bulk memory
expressions that referred to the segments. The parallel analysis pass to collect
these referrers allocated one of these vectors for each function in a module.
Unfortunately, for a particularly large module with over 200k functions and over
75k data segments, this resulted in hundreds of gigabytes of memory allocations.
The vast majority of functions contain no referrers, so using a
std::unordered_map makes much more sense than using a vector to perform this
mapping.
Diffstat (limited to 'test/lit/binary/stacky-nn-tuple.test')
0 files changed, 0 insertions, 0 deletions