[PATCH] D22980: Imported statistics types changes
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 15:13:51 PDT 2016
tejohnson added inline comments.
================
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());
+ }
----------------
Prazek wrote:
> 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.
The Caller function wouldn't have disappeared by here. The reason it needed to change is that NonImportedCallers was changed to store StringRef instead of a std::string, and we can use the StringRef owned by NodesMap to avoid creating a new copy of the string.
https://reviews.llvm.org/D22980
More information about the llvm-commits
mailing list