[PATCH] D108433: [CSSPGO] split context string - compiler changes

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 22:58:38 PDT 2021


wlei added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:98
+      if (A->getTotalSamples() == B->getTotalSamples())
+        return A->getContext() < B->getContext();
+      return A->getTotalSamples() > B->getTotalSamples();
----------------
I remember you mentioned this is the bottleneck, so how about adding another check to filter more cases, specifically use the frame size(or context string size). like the above code.
I'm also curious why here it changed to use `std::set` instead of `SmallVector`, I guess it will change to semantic of the original code if the context has two same frame function name.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108433/new/

https://reviews.llvm.org/D108433



More information about the llvm-commits mailing list