File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
llvm/include/llvm/Transforms/IPO Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -150,13 +150,13 @@ class ProfiledCallGraph {
150150private:
151151 void addProfiledCall (FunctionId CallerName, FunctionId CalleeName,
152152 uint64_t Weight = 0 ) {
153- assert (ProfiledFunctions.count (CallerName));
154153 auto CalleeIt = ProfiledFunctions.find (CalleeName);
155154 if (CalleeIt == ProfiledFunctions.end ())
156155 return ;
157- ProfiledCallGraphEdge Edge (ProfiledFunctions[CallerName],
158- CalleeIt->second , Weight);
159- auto &Edges = ProfiledFunctions[CallerName]->Edges ;
156+ auto CallerIt = ProfiledFunctions.find (CallerName);
157+ assert (CallerIt != ProfiledFunctions.end ());
158+ ProfiledCallGraphEdge Edge (CallerIt->second , CalleeIt->second , Weight);
159+ auto &Edges = CallerIt->second ->Edges ;
160160 auto [EdgeIt, Inserted] = Edges.insert (Edge);
161161 if (!Inserted) {
162162 // Accumulate weight to the existing edge.
You can’t perform that action at this time.
0 commit comments