Skip to content

Commit c76a34a

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 8ebeba6 commit c76a34a

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
@@ -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
@@ -182,15 +182,15 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
182182
// (Re)use NodesInLastSCC to remember the nodes in the SCC right now,
183183
// in case the SCC is split before onPassExit and some nodes are split out
184184
assert(NodesInLastSCC.empty());
185-
for (const auto &N : *LastSCC)
185+
for (const auto &N : *CurSCC)
186186
NodesInLastSCC.insert(&N);
187187
}
188188

189-
void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *LastSCC) {
189+
void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *CurSCC) {
190190
// No need to keep this around - function passes will invalidate it.
191191
if (!KeepFPICache)
192192
FPICache.clear();
193-
if (!LastSCC || ForceStop)
193+
if (!CurSCC || ForceStop)
194194
return;
195195
// Keep track of the nodes and edges we last saw. Then, in onPassEntry,
196196
// we update the node count and edge count from the subset of these nodes that
@@ -206,7 +206,7 @@ void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *LastSCC) {
206206
}
207207

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

0 commit comments

Comments
 (0)