[PATCH] D100090: [CSSPGO] Fix dangling context strings and improve profile order consistency and error handling

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 11:59:15 PDT 2021


wenlei marked an inline comment as done.
wenlei added inline comments.


================
Comment at: llvm/lib/ProfileData/SampleProf.cpp:388
+    assert(Ret.second && "Conext conflict during canonicalization");
+    FProfile = Ret.first->second;
+
----------------
hoy wrote:
> Still trying to understand. So for cold profile trim, what kind of a profile can be here. In `trimAndMergeColdContextProfiles` all cold profiles are removed and all based profiles are added into `ProfileMap`.
Cold profile trimming is simply removing cold profiles, so it won't lead to inconsistency between profile map key and actual profile's context. Actually now looking at the merging part again, the currently implementation doesn't require canonicalization either as the new base profile has the correct key.

I'm removing canonicalization from trimAndMergeColdContextProfiles, but pre-inliner still needs it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100090



More information about the llvm-commits mailing list