[PATCH] D108722: [CSSPGO] Avoid repeatedly computing md5 hash code for pseudo probe inline contexts.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 29 21:15:06 PDT 2021


wenlei accepted this revision.
wenlei added a comment.
This revision is now accepted and ready to land.

lgtm assuming the test failure is fixed, thanks.

looks like there's indeed room for improvement by replacing md5 with xxhash etc.



================
Comment at: llvm/lib/CodeGen/AsmPrinter/PseudoProbePrinter.cpp:38-40
+    uint64_t &CallerGuid = NameGuidMap[Name];
+    if (!CallerGuid)
+      CallerGuid = Function::getGUID(Name);
----------------
A comment explaining the caching/memoization as a build speed optimization would be helpful.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108722



More information about the llvm-commits mailing list