aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorwlei <wlei@fb.com>2022-06-27 22:57:22 -0700
committerwlei <wlei@fb.com>2022-06-27 23:22:21 -0700
commiteba5749262d9f1c6754984034c7a81fcd9bc3de6 (patch)
tree56175b9f8ac0400a3ceb8daef7c100f650055728 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent834a38bbcbcf5f507fe5d47174629bf5635fdb2d (diff)
downloadllvm-eba5749262d9f1c6754984034c7a81fcd9bc3de6.zip
llvm-eba5749262d9f1c6754984034c7a81fcd9bc3de6.tar.gz
llvm-eba5749262d9f1c6754984034c7a81fcd9bc3de6.tar.bz2
[CSSPGO][llvm-profgen] Reimplement CS profile generator using context trie
Our investigation showed ProfileMap's key is the bottleneck of the memory consumption for CS profile generation on some large services. This patch tries to optimize it by storing the CS function samples using the context trie tree structure instead of the context frame array ref. Parts of code in `ContextTrieNode` are reused. Our experiment on one internal service showed that the context key's memory can be reduced from 80GB to 300MB. To be compatible with non-CS profiles, the profile writer still needs to use ProfileMap as input, so rebuild the ProfileMap using the context trie in `postProcessProfiles`. The optimization is not complete yet, next step is to reimplement Pre-inliner or profile trimmer, after that, ProfileMap should be small to be written. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D125246
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions