Skip to content

Commit 0555afd

Browse files
authored
[NFC][MLInliner] Rename LastSCC -> CurSCC (llvm#96546)
The passed SCC is the current SCC we're working on.
1 parent d30b082 commit 0555afd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/Analysis/MLInlineAdvisor.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ unsigned MLInlineAdvisor::getInitialFunctionLevel(const Function &F) const {
187187
return CG.lookup(F) ? FunctionLevels.at(CG.lookup(F)) : 0;
188188
}
189189

190-
void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
191-
if (!LastSCC || ForceStop)
190+
void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {
191+
if (!CurSCC || ForceStop)
192192
return;
193193
FPICache.clear();
194194
// Function passes executed between InlinerPass runs may have changed the
@@ -235,15 +235,15 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
235235
// (Re)use NodesInLastSCC to remember the nodes in the SCC right now,
236236
// in case the SCC is split before onPassExit and some nodes are split out
237237
assert(NodesInLastSCC.empty());
238-
for (const auto &N : *LastSCC)
238+
for (const auto &N : *CurSCC)
239239
NodesInLastSCC.insert(&N);
240240
}
241241

242-
void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *LastSCC) {
242+
void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *CurSCC) {
243243
// No need to keep this around - function passes will invalidate it.
244244
if (!KeepFPICache)
245245
FPICache.clear();
246-
if (!LastSCC || ForceStop)
246+
if (!CurSCC || ForceStop)
247247
return;
248248
// Keep track of the nodes and edges we last saw. Then, in onPassEntry,
249249
// we update the node count and edge count from the subset of these nodes that
@@ -259,7 +259,7 @@ void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *LastSCC) {
259259
}
260260

261261
// Check on nodes that may have got added to SCC
262-
for (const auto &N : *LastSCC) {
262+
for (const auto &N : *CurSCC) {
263263
assert(!N.isDead());
264264
auto I = NodesInLastSCC.insert(&N);
265265
if (I.second)

0 commit comments

Comments
 (0)