aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2024-01-03 07:19:56 -0800
committerGitHub <noreply@github.com>2024-01-03 07:19:56 -0800
commit329ba523ccbbe68a12434926c92fd9a86494d958 (patch)
tree063bd7b4b2f78452cd8886f9d23da79da1e2d366 /llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
parent7837110ed8efdd510516c849178a7af28b93aea4 (diff)
downloadllvm-329ba523ccbbe68a12434926c92fd9a86494d958.zip
llvm-329ba523ccbbe68a12434926c92fd9a86494d958.tar.gz
llvm-329ba523ccbbe68a12434926c92fd9a86494d958.tar.bz2
[LTO][NFC] Free the GlobalResolutions map after final use (#76780)
The GlobalResolutions map was found to contribute ~9% of the peak memory of a large thin link. However, we are essentially done with it when we are about to compute cross module imports, which itself adds to the peak memory due to the import and export lists (there is one use just after importing but it can easily be moved before importing). Move the last use up above importing, and free the GlobalResolutions map after that (and before importing). To help guard against future inadvertent use after it has been released, change it to a std::optional.
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions