Skip to content

Commit a71c5f4

Browse files
aeubanksanton-bannykh
authored andcommitted
[NFC][MLInliner] Rename LastSCC -> CurSCC (llvm#96546)
The passed SCC is the current SCC we're working on. (cherry picked from commit 0555afd)
1 parent f874b2e commit a71c5f4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

llvm/lib/Analysis/MLInlineAdvisor.cpp

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

142-
void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
143-
if (!LastSCC || ForceStop)
142+
void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {
143+
if (!CurSCC || ForceStop)
144144
return;
145145
FPICache.clear();
146146
// Function passes executed between InlinerPass runs may have changed the
@@ -173,6 +173,7 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
173173
auto I = AllNodes.insert(AdjNode);
174174
if (I.second)
175175
NodesInLastSCC.insert(AdjNode);
176+
}
176177
}
177178
}
178179

@@ -182,15 +183,15 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
182183
// (Re)use NodesInLastSCC to remember the nodes in the SCC right now,
183184
// in case the SCC is split before onPassExit and some nodes are split out
184185
assert(NodesInLastSCC.empty());
185-
for (const auto &N : *LastSCC)
186+
for (const auto &N : *CurSCC)
186187
NodesInLastSCC.insert(&N);
187188
}
188189

189-
void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *LastSCC) {
190+
void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *CurSCC) {
190191
// No need to keep this around - function passes will invalidate it.
191192
if (!KeepFPICache)
192193
FPICache.clear();
193-
if (!LastSCC || ForceStop)
194+
if (!CurSCC || ForceStop)
194195
return;
195196
// Keep track of the nodes and edges we last saw. Then, in onPassEntry,
196197
// 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) {
206207
}
207208

208209
// Check on nodes that may have got added to SCC
209-
for (const auto &N : *LastSCC) {
210+
for (const auto &N : *CurSCC) {
210211
assert(!N.isDead());
211212
auto I = NodesInLastSCC.insert(&N);
212213
if (I.second)

0 commit comments

Comments
 (0)