[PATCH] D36637: Import all inlined indirect call targets for SamplePGO.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 12:07:14 PDT 2017


tejohnson added inline comments.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:734
       if (!CalledFunction || !CalledFunction->getSubprogram()) {
-        findCalleeFunctionSamples(*I)->findImportedFunctions(
-            ImportGUIDs, F.getParent(),
-            Samples->getTotalSamples() * SampleProfileHotThreshold / 100);
+        for (const FunctionSamples *FS : findIndirectCallFunctionSamples(*I))
+          FS->findImportedFunctions(
----------------
I'm not really following the flow of what is supposed to happen here. I see that the earlier code already does an iteration over findIndirectCallFunctionSamples - can/should this be combined with that?


================
Comment at: test/Transforms/SampleProfile/import.ll:18
 
 ; GUIDs of foo and bar should be included in the metadata to make sure hot
 ; inline stacks are imported.
----------------
Update comment (foo1 and foo2 also)


https://reviews.llvm.org/D36637





More information about the llvm-commits mailing list