[PATCH] D107173: [CSSPGO] Introduce MD5-based context-sensitive profile
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 30 12:28:03 PDT 2021
wmi added a comment.
Thanks for the work to reduce the CS profile size! It is something we really need.
I am also trying it in a slightly different way.
For "[main:3.1 @ _Z5funcBi]:120:19" in your example, I split the context string into multiple tuples of {string, line, discriminator}:
{main, 3, 1} {_Z5funcBi, 0, 0}, and for each name in the tuple, we will only save the index to the name table. So we will not have new entry in the name table for different contexts.
In this way, we won't have any increase in the name table section compared with non-CS profile even when we uses string based name. We do need to have a new section called CSNameTable to store the tuples. When we read the section, we will recontruct the context string from the tuple and the rest of the profile handling will have no change.
In this way, on top of it we can also apply md5 to the nametable using existing md5 mechanism, to further compress the name table section.
I havn't finished the implemention, but I am close to it. It will be good to discuss how we converge the effort here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107173/new/
https://reviews.llvm.org/D107173
More information about the llvm-commits
mailing list