File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,6 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {
211
211
// care about the nature of the Edge (call or ref). `FunctionLevels`-wise, we
212
212
// record them at the same level as the original node (this is a choice, may
213
213
// need revisiting).
214
- NodeCount -= static_cast <int64_t >(NodesInLastSCC.size ());
215
214
while (!NodesInLastSCC.empty ()) {
216
215
const auto *N = *NodesInLastSCC.begin ();
217
216
NodesInLastSCC.erase (N);
@@ -220,14 +219,15 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {
220
219
assert (!N->getFunction ().isDeclaration ());
221
220
continue ;
222
221
}
223
- ++NodeCount;
224
222
EdgeCount += getLocalCalls (N->getFunction ());
225
223
const auto NLevel = FunctionLevels.at (N);
226
224
for (const auto &E : *(*N)) {
227
225
const auto *AdjNode = &E.getNode ();
228
226
assert (!AdjNode->isDead () && !AdjNode->getFunction ().isDeclaration ());
229
227
auto I = AllNodes.insert (AdjNode);
228
+ // We've discovered a new function.
230
229
if (I.second ) {
230
+ ++NodeCount;
231
231
NodesInLastSCC.insert (AdjNode);
232
232
FunctionLevels[AdjNode] = NLevel;
233
233
}
You can’t perform that action at this time.
0 commit comments