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 {
150
150
private:
151
151
void addProfiledCall (FunctionId CallerName, FunctionId CalleeName,
152
152
uint64_t Weight = 0 ) {
153
- assert (ProfiledFunctions.count (CallerName));
154
153
auto CalleeIt = ProfiledFunctions.find (CalleeName);
155
154
if (CalleeIt == ProfiledFunctions.end ())
156
155
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 ;
160
160
auto [EdgeIt, Inserted] = Edges.insert (Edge);
161
161
if (!Inserted) {
162
162
// Accumulate weight to the existing edge.
You can’t perform that action at this time.
0 commit comments