[llvm] [MemProf] Reduce unnecessary context id computation (NFC) (PR #109857)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 15:35:06 PDT 2024


================
@@ -1398,31 +1408,37 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::
     // duplicated context ids. We have to recompute as we might have overlap
     // overlap between the saved context ids for different last nodes, and
     // removed them already during the post order traversal.
----------------
teresajohnson wrote:

> 

> Does this comment need to be updated? I guess "recompute" doesn't refer to the `getContextIds()` call that is now elided.

Right on the latter - it doesn't refer to getContextIds but rather to the recomputation that remains here.
> 
> Also can L1402 `ContextNode *FirstNode = ...` now be moved closer to where it is used?

Done

https://github.com/llvm/llvm-project/pull/109857


More information about the llvm-commits mailing list