aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2020-08-10 12:35:19 -0700
committerWei Mi <wmi@google.com>2020-08-10 12:41:09 -0700
commit4cd8e9b169f4dc5dde19807585c86f6d6113d3ff (patch)
tree1610bc9e5dc2ebc05b98baef2813863a12cff0a6 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent514445e0353e82fa0bd59eeea437499500e232cd (diff)
downloadllvm-4cd8e9b169f4dc5dde19807585c86f6d6113d3ff.zip
llvm-4cd8e9b169f4dc5dde19807585c86f6d6113d3ff.tar.gz
llvm-4cd8e9b169f4dc5dde19807585c86f6d6113d3ff.tar.bz2
[SampleFDO] Stop letting findCalleeFunctionSamples return unrelated profiles
for invoke instructions. We see a warning of "No debug information found in function foo: Function profile not used" in a case. The function foo is called by an invoke instruction. It has no debug information because it has attribute((nodebug)) in the definition. It shouldn't have profile instance in the sample profile but compiler thinks it does, that turns out to be a compiler bug in findCalleeFunctionSamples. The bug is exposed when sample-profile-merge-inlinee is enabled recently. Currently in findCalleeFunctionSamples, CalleeName is unset and is empty for invoke instruction. For empty CalleeName, findFunctionSamplesAt will treat the call as an indirect call and will return any inline instance profile at the same location as the instruction. That leads to a wrong profile being returned to function foo. The patch set CalleeName when the instruction is an invoke. Differential Revision: https://reviews.llvm.org/D85664
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions