File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,6 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {
156
156
// they'd be adjacent to Nodes in the last SCC. So we just need to check the
157
157
// boundary of Nodes in NodesInLastSCC for Nodes we haven't seen. We don't
158
158
// care about the nature of the Edge (call or ref).
159
- NodeCount -= static_cast <int64_t >(NodesInLastSCC.size ());
160
159
while (!NodesInLastSCC.empty ()) {
161
160
const auto *N = *NodesInLastSCC.begin ();
162
161
NodesInLastSCC.erase (N);
@@ -165,14 +164,16 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {
165
164
assert (!N->getFunction ().isDeclaration ());
166
165
continue ;
167
166
}
168
- ++NodeCount;
169
167
EdgeCount += getLocalCalls (N->getFunction ());
170
168
for (const auto &E : *(*N)) {
171
169
const auto *AdjNode = &E.getNode ();
172
170
assert (!AdjNode->isDead () && !AdjNode->getFunction ().isDeclaration ());
173
171
auto I = AllNodes.insert (AdjNode);
174
- if (I.second )
172
+ // We've discovered a new function.
173
+ if (I.second ) {
174
+ ++NodeCount;
175
175
NodesInLastSCC.insert (AdjNode);
176
+ }
176
177
}
177
178
}
178
179
You can’t perform that action at this time.
0 commit comments