[PATCH] D79379: Don't add function to import list if it's defined in the same module
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 21:32:16 PDT 2020
wenlei added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/SampleProf.h:541
const Function *Callee = M->getFunction(getFuncName(TS.getKey()));
if (!Callee || !Callee->getSubprogram())
S.insert(getGUID(TS.getKey()));
----------------
lxfind wrote:
> @wenlei Do you know why we are checking for getSubprogram() here?
I didn't notice this, but it looks fishy to me. We could have declaration with `!dbg` (see `metadata-function-dbg.ll`) which we should still import. We could also have definition without `!dbg`.. I'm not sure why we check `getSubprogram()` - I guess we can verify by trying to contrive a case that this logic would miss for importing.. @wmi is this intentional?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79379/new/
https://reviews.llvm.org/D79379
More information about the llvm-commits
mailing list