[llvm] Reapply "[MemProf] Streamline and avoid unnecessary context id duplication (#107918)" (PR #110036)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 13:19:01 PDT 2024


================
@@ -1379,7 +1379,15 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::
   DenseSet<uint32_t> LastNodeContextIds = LastNode->getContextIds();
   assert(!LastNodeContextIds.empty());
 
+#ifndef NDEBUG
----------------
snehasish wrote:

Here keeping `CreatedNode` and `PrevIterCreatedNode` around in the optimized build should have little impact. Can we  avoid the ifndef (and differing loop header) here and L1461-L1463?

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


More information about the llvm-commits mailing list