[llvm] [PseudoProbe] Use probe id as the base dwarf discriminator for callsites (PR #65685)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 8 08:48:52 PDT 2023
================
@@ -2075,6 +2076,11 @@ class DILocation : public MDNode {
static unsigned
getBaseDiscriminatorFromDiscriminator(unsigned D,
bool IsFSDiscriminator = false) {
+ // Return the probe id instead of zero for a pseudo probe discriminator.
+ // This should help differenciate callsites with same line numbers.
----------------
WenleiHe wrote:
Suggest to make it clear that this is so we can still generate good quality AutoFDO profile when -fpseudo-probe-for-profiling is on, in which case we will use probe-id for calls as AutoFDO's discriminator for calls locations to avoid losing all discriminators for callsites.
https://github.com/llvm/llvm-project/pull/65685
More information about the llvm-commits
mailing list