[llvm] [MemProf] Ensure all callsite clones are assigned a function clone (PR #150735)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 27 10:18:24 PDT 2025
================
@@ -3995,7 +4024,19 @@ void IndexCallsiteContextGraph::updateCall(CallInfo &CallerCall,
assert(CI &&
"Caller cannot be an allocation which should not have profiled calls");
assert(CI->Clones.size() > CallerCall.cloneNo());
- CI->Clones[CallerCall.cloneNo()] = CalleeFunc.cloneNo();
+ auto NewCalleeCloneNo = CalleeFunc.cloneNo();
+ auto CurCalleeCloneNo = CI->Clones[CallerCall.cloneNo()];
----------------
teresajohnson wrote:
Clones is a vector, not a map, and we've already asserted just above that it is long enough to contain an entry for this index. Therefore I've kept the code as is for now.
https://github.com/llvm/llvm-project/pull/150735
More information about the llvm-commits
mailing list