summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2024-06-03 20:32:20 -0700
committerGitHub <noreply@github.com>2024-06-03 20:32:20 -0700
commitf4d705871a073259c220b80026614d46d939cb5b (patch)
treed94613c0d74905ddd52b5084e4df00258463f054 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentd0413438ec4d846211094b0652cf6c0f3c9408bb (diff)
[MemProf] Determine stack id references in BitcodeWriter without sorting (#94285)
A cycle profile of a thin link showed a lot of time spent in sort called from the BitcodeWriter, which was being used to compute the unique references to stack ids in the summaries emitted for each backend in a distributed thinlto build. We were also frequently invoking lower_bound to locate stack id indices in the resulting vector when writing out the referencing memprof records. Change this to use a map to uniquify the references, and to hold the index of the corresponding stack id in the StackIds vector, which is now populated at the same time. This reduced the time of a large thin link by about 10%.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions