[PATCH] D125246: [CSSPGO][llvm-profgen] Reimplement CS profile generator using context trie
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 12:09:06 PDT 2022
wlei added inline comments.
================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:941
+ NewProfile.setContext(FContext);
+ delete (FProfile);
+ }
----------------
hoy wrote:
> wlei wrote:
> > hoy wrote:
> > > Can `FProfile` be updated in place to avoid copy and deletion?
> > the profile in ProfileMap require the full context as the key, so we can't create the value in `ProfileMap` in the early time. Or perhaps we can use the move semantics, but `FunctionSamples` currently doesn't have the move constructor, which will make things complicated. I think after the trimming and pre-inliner, the num of profile will be small, copy and deletion should be fine then?
> Makes sense. Eventually the trie should be small after preinliner.
>
> You may want to set `Node.getFunctionSamples()` to be null after deleting it.
>
>
Set to null, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125246/new/
https://reviews.llvm.org/D125246
More information about the llvm-commits
mailing list