aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2024-06-24 14:25:06 -0600
committerGitHub <noreply@github.com>2024-06-24 13:25:06 -0700
commit0555afd02401551c10dbf7f646a98501929b27e2 (patch)
treefec9108c3bee50420b1c7703bbe0f3aa3ca34766
parentd30b082fd4aeba0a3a99c3f17dbffe6691f859cc (diff)
downloadllvm-0555afd02401551c10dbf7f646a98501929b27e2.zip
llvm-0555afd02401551c10dbf7f646a98501929b27e2.tar.gz
llvm-0555afd02401551c10dbf7f646a98501929b27e2.tar.bz2
[NFC][MLInliner] Rename LastSCC -> CurSCC (#96546)
The passed SCC is the current SCC we're working on.
-rw-r--r--llvm/lib/Analysis/MLInlineAdvisor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/MLInlineAdvisor.cpp b/llvm/lib/Analysis/MLInlineAdvisor.cpp
index 2194657..934c0cf 100644
--- a/llvm/lib/Analysis/MLInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/MLInlineAdvisor.cpp
@@ -187,8 +187,8 @@ unsigned MLInlineAdvisor::getInitialFunctionLevel(const Function &F) const {
return CG.lookup(F) ? FunctionLevels.at(CG.lookup(F)) : 0;
}
-void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
- if (!LastSCC || ForceStop)
+void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *CurSCC) {
+ if (!CurSCC || ForceStop)
return;
FPICache.clear();
// Function passes executed between InlinerPass runs may have changed the
@@ -235,15 +235,15 @@ void MLInlineAdvisor::onPassEntry(LazyCallGraph::SCC *LastSCC) {
// (Re)use NodesInLastSCC to remember the nodes in the SCC right now,
// in case the SCC is split before onPassExit and some nodes are split out
assert(NodesInLastSCC.empty());
- for (const auto &N : *LastSCC)
+ for (const auto &N : *CurSCC)
NodesInLastSCC.insert(&N);
}
-void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *LastSCC) {
+void MLInlineAdvisor::onPassExit(LazyCallGraph::SCC *CurSCC) {
// No need to keep this around - function passes will invalidate it.
if (!KeepFPICache)
FPICache.clear();
- if (!LastSCC || ForceStop)
+ if (!CurSCC || ForceStop)
return;
// Keep track of the nodes and edges we last saw. Then, in onPassEntry,
// 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) {
}
// Check on nodes that may have got added to SCC
- for (const auto &N : *LastSCC) {
+ for (const auto &N : *CurSCC) {
assert(!N.isDead());
auto I = NodesInLastSCC.insert(&N);
if (I.second)