[PATCH] D22980: Imported statistics types changes
Piotr Padlewski via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 14:53:44 PDT 2016
Prazek marked 2 inline comments as done.
================
Comment at: lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp:55
@@ -53,2 +54,3 @@
// Save Caller as a starting node for traversal.
- NonImportedCallers.push_back(Caller.getName());
+ NonImportedCallers.push_back(It->first());
+ }
----------------
vsk wrote:
> Does this line need to change?
Yes, because the map stores std::string of functions name. The name from Function can dissapear because the Function can dissapear.
Added extra comment to make it clear.
================
Comment at: lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp:186
@@ -188,1 +185,3 @@
+ for (const auto & Node : NodesMap)
+ SortedNodes.push_back(&Node);
----------------
vsk wrote:
> It would probably be clearer to either change the `const auto &` to `std::unique_ptr<...> &` or to use `Node.get()` here.
The type is different than you think. It is StringMapEntry, so I am pushing pointers to StringMapEntry.
I added type to make it more clear.
https://reviews.llvm.org/D22980
More information about the llvm-commits
mailing list