[PATCH] D22491: Added ThinLTO inlining statistics

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 16:38:17 PDT 2016


Prazek added inline comments.

================
Comment at: include/llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h:63
@@ +62,3 @@
+    bool Visited = false;
+    /// Store name because the function pointer might be dead.
+    std::string FunctionName;
----------------
tejohnson wrote:
> Instead, I like Easwaran's suggestion to make NodesMap a StringMap. 
> 
> Then NonImportedCallers should be a vector of strings. Note that StringMap stores a copy of the key when you insert, so you could store the resulting StringRef (returned when the StringMap entry is inserted) in the NonImportedCallers vector instead of a std::string copy.
> 
> It is cleaner than using keys that are pointers to possibly deleted memory.
I talked with Easwaran and I don't think there is a point changit the map. It will be much slower and won't get any new information, and it will take a time to change everything again.


https://reviews.llvm.org/D22491





More information about the llvm-commits mailing list