[PATCH] D70653: [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 10:45:53 PST 2019
wmi added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/SampleProfReader.h:363
+ /// FunctionSamples if it doesn't exist.
+ FunctionSamples *getOrCreateSamplesFor(const Function &F) {
+ std::string FGUID;
----------------
wenlei wrote:
> wmi wrote:
> > I found a potential problem here. When we create a new profile for a function when merging inline instance profile back, if the function somehow has no debug information, the annotation will fail and a warning will be issued. We may want to skip those functions without debug information (The warning is issued in SampleProfileLoader::getFunctionLoc)
> For these cases, if the function without debug info wasn't inlined, we would still get the warning, right? I though the warning in this case is no different and as helpful comparing to other cases, or did I miss anything?
Although without the patch, we may also see the warning because of the source drift or compiler upgrade, in reality we rarely see that happens. I am worried that the patch may increase the chance of such warning and break many builds.
So I will look into it and see what causes the warning and whether it is a rare case or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70653/new/
https://reviews.llvm.org/D70653
More information about the llvm-commits
mailing list