[PATCH] D98590: [CSSPGO] Load context profile for external functions in PreLink and populate ThinLTO import list

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 14 12:57:38 PDT 2021


wmi added inline comments.


================
Comment at: llvm/lib/ProfileData/SampleProfReader.cpp:730
+          // load it repeatedly.
+          OrderedNames.erase(It++);
+        }
----------------
Better use: It = OrderedNames.erase(It);


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:976
+    for (auto &Child : Node->getAllChildContext()) {
+      ContextTrieNode *CalleeNode = &Child.second;
+      CalleeList.push(CalleeNode);
----------------
The hotness of CalleeNode is not checked before it is inserted into CalleeList. Will it add unnecessary imports?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98590



More information about the llvm-commits mailing list