llvm-project
b488ce0a - [memprof] Improve call site matching (#129770)

Commit
210 days ago
[memprof] Improve call site matching (#129770) Suppose we have a call instruction satisfying: - AllocInfoIter != LocHashToAllocInfo.end() - CallSitesIter != LocHashToCallSites.end() - !isAllocationWithHotColdVariant(CI->getCalledFunction(), TLI) In this case this patch, we would take: if (AllocInfoIter != LocHashToAllocInfo.end() but end up discarding the opportunity because of the call to isAllocationWithHotColdVariant. This can happen in C++ code like: new Something[100]; which is lowered to two calls -- new and the constructor. This patch fixes the problem by falling back to the call site annotation if we have !isAllocationWithHotColdVariant.
Parents
Loading