@@ -139,8 +139,8 @@ unsigned MLInlineAdvisor::getInitialFunctionLevel(const Function &F) const {
139
139
return CG.lookup (F) ? FunctionLevels.at (CG.lookup (F)) : 0 ;
140
140
}
141
141
142
- void MLInlineAdvisor::onPassEntry (LazyCallGraph::SCC *LastSCC ) {
143
- if (!LastSCC || ForceStop)
142
+ void MLInlineAdvisor::onPassEntry (LazyCallGraph::SCC *CurSCC ) {
143
+ if (!CurSCC || ForceStop)
144
144
return ;
145
145
FPICache.clear ();
146
146
// Function passes executed between InlinerPass runs may have changed the
@@ -173,6 +173,7 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
173
173
auto I = AllNodes.insert (AdjNode);
174
174
if (I.second )
175
175
NodesInLastSCC.insert (AdjNode);
176
+ }
176
177
}
177
178
}
178
179
@@ -182,15 +183,15 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
182
183
// (Re)use NodesInLastSCC to remember the nodes in the SCC right now,
183
184
// in case the SCC is split before onPassExit and some nodes are split out
184
185
assert (NodesInLastSCC.empty());
185
- for (const auto &N : *LastSCC )
186
+ for (const auto &N : *CurSCC )
186
187
NodesInLastSCC.insert(&N);
187
188
}
188
189
189
- void MLInlineAdvisor::onPassExit (LazyCallGraph::SCC *LastSCC ) {
190
+ void MLInlineAdvisor::onPassExit (LazyCallGraph::SCC *CurSCC ) {
190
191
// No need to keep this around - function passes will invalidate it.
191
192
if (!KeepFPICache)
192
193
FPICache.clear ();
193
- if (!LastSCC || ForceStop)
194
+ if (!CurSCC || ForceStop)
194
195
return ;
195
196
// Keep track of the nodes and edges we last saw. Then, in onPassEntry,
196
197
// we update the node count and edge count from the subset of these nodes that
@@ -206,7 +207,7 @@ void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *LastSCC) {
206
207
}
207
208
208
209
// Check on nodes that may have got added to SCC
209
- for (const auto &N : *LastSCC ) {
210
+ for (const auto &N : *CurSCC ) {
210
211
assert (!N.isDead ());
211
212
auto I = NodesInLastSCC.insert (&N);
212
213
if (I.second )
0 commit comments