Skip to content

[NFC][MLInliner] Rename LastSCC -> CurSCC #96546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2024
Merged

[NFC][MLInliner] Rename LastSCC -> CurSCC #96546

merged 1 commit into from
Jun 24, 2024

Conversation

aeubanks
Copy link
Contributor

The passed SCC is the current SCC we're working on.

The passed SCC is the current SCC we're working on.
@aeubanks aeubanks requested a review from mtrofin June 24, 2024 20:07
@llvmbot llvmbot added mlgo llvm:analysis Includes value tracking, cost tables and constant folding labels Jun 24, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 24, 2024

@llvm/pr-subscribers-llvm-analysis

@llvm/pr-subscribers-mlgo

Author: Arthur Eubanks (aeubanks)

Changes

The passed SCC is the current SCC we're working on.


Full diff: https://github.com/llvm/llvm-project/pull/96546.diff

1 Files Affected:

  • (modified) llvm/lib/Analysis/MLInlineAdvisor.cpp (+6-6)
diff --git a/llvm/lib/Analysis/MLInlineAdvisor.cpp b/llvm/lib/Analysis/MLInlineAdvisor.cpp
index 21946572339b9..934c0cfb6e20c 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)

@aeubanks aeubanks merged commit 0555afd into llvm:main Jun 24, 2024
7 of 9 checks passed
@aeubanks aeubanks deleted the nfc branch June 24, 2024 20:25
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 24, 2024

LLVM Buildbot has detected a new failure on builder clang-cuda-t4 running on cuda-t4-0 while building llvm at step 3 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/69/builds/603

Here is the relevant piece of the build log for the reference:

Step 3 (annotate) failure: '/buildbot/cuda-build --jobs=' (failure)
...
[ RUN      ] LlvmLibcBlockStoreTest.BackReverse
[       OK ] LlvmLibcBlockStoreTest.BackReverse (45 us)
[ RUN      ] LlvmLibcBlockStoreTest.Empty
[       OK ] LlvmLibcBlockStoreTest.Empty (47 us)
Ran 9 tests.  PASS: 9  FAIL: 0
[608/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_first_trailing_zero_ul_test.__hermetic__.__build__
[609/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_has_single_bit_ull_test.__hermetic__.__build__
[610/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_uc_test.__hermetic__.__build__
[611/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_ui_test.__hermetic__.__build__
[612/1022] Running hermetic test libc.test.src.__support.freelist_test.__hermetic__
FAILED: libc/test/src/__support/CMakeFiles/libc.test.src.__support.freelist_test.__hermetic__ /buildbot/cuda-t4-0/work/clang-cuda-t4/build-libc/libc/test/src/__support/CMakeFiles/libc.test.src.__support.freelist_test.__hermetic__ 
cd /buildbot/cuda-t4-0/work/clang-cuda-t4/build-libc/libc/test/src/__support && /buildbot/cuda-t4-0/work/clang-cuda-t4/clang/bin/nvptx-loader /buildbot/cuda-t4-0/work/clang-cuda-t4/build-libc/libc/test/src/__support/libc.test.src.__support.freelist_test.__hermetic__.__build__
[==========] Running 9 tests from 1 test suite.
[ RUN      ] LlvmLibcFreeList.EmptyListHasNoMembers
[       OK ] LlvmLibcFreeList.EmptyListHasNoMembers (6 us)
[ RUN      ] LlvmLibcFreeList.CanRetrieveAddedMember
[       OK ] LlvmLibcFreeList.CanRetrieveAddedMember (12 us)
[ RUN      ] LlvmLibcFreeList.CanRetrieveAddedMemberForSmallerSize
[       OK ] LlvmLibcFreeList.CanRetrieveAddedMemberForSmallerSize (10 us)
[ RUN      ] LlvmLibcFreeList.CanRemoveItem
[       OK ] LlvmLibcFreeList.CanRemoveItem (10 us)
[ RUN      ] LlvmLibcFreeList.FindReturnsSmallestChunk
[       OK ] LlvmLibcFreeList.FindReturnsSmallestChunk (25 us)
[ RUN      ] LlvmLibcFreeList.FindReturnsCorrectChunkInSameBucket
[       OK ] LlvmLibcFreeList.FindReturnsCorrectChunkInSameBucket (12 us)
[ RUN      ] LlvmLibcFreeList.FindCanMoveUpThroughBuckets
/ssd/cuda-builder/work/llvm-project/libc/utils/gpu/loader/nvptx/Loader.cpp:339:0: Error: misaligned address
[613/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_us_test.__hermetic__.__build__
[614/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_ul_test.__hermetic__.__build__
[615/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_ui_test.__hermetic__.__build__
[616/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_ull_test.__hermetic__.__build__
[617/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_us_test.__hermetic__.__build__
[618/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_ul_test.__hermetic__.__build__
[619/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_uc_test.__hermetic__.__build__
[620/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_ceil_uc_test.__hermetic__.__build__
[621/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_ull_test.__hermetic__.__build__
ninja: build stopped: subcommand failed.
++ err=1
++ echo PID 87: subprocess exited with error 1
++ exit 1
PID 87: subprocess exited with error 1
+ step_failure
+ echo @@@STEP_FAILURE@@@
@@@STEP_FAILURE@@@
Step 13 (Testing GPU libc) failure:  (failure)
...
[ RUN      ] LlvmLibcBlockStoreTest.BackReverse
[       OK ] LlvmLibcBlockStoreTest.BackReverse (45 us)
[ RUN      ] LlvmLibcBlockStoreTest.Empty
[       OK ] LlvmLibcBlockStoreTest.Empty (47 us)
Ran 9 tests.  PASS: 9  FAIL: 0
[608/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_first_trailing_zero_ul_test.__hermetic__.__build__
[609/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_has_single_bit_ull_test.__hermetic__.__build__
[610/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_uc_test.__hermetic__.__build__
[611/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_ui_test.__hermetic__.__build__
[612/1022] Running hermetic test libc.test.src.__support.freelist_test.__hermetic__
FAILED: libc/test/src/__support/CMakeFiles/libc.test.src.__support.freelist_test.__hermetic__ /buildbot/cuda-t4-0/work/clang-cuda-t4/build-libc/libc/test/src/__support/CMakeFiles/libc.test.src.__support.freelist_test.__hermetic__ 
cd /buildbot/cuda-t4-0/work/clang-cuda-t4/build-libc/libc/test/src/__support && /buildbot/cuda-t4-0/work/clang-cuda-t4/clang/bin/nvptx-loader /buildbot/cuda-t4-0/work/clang-cuda-t4/build-libc/libc/test/src/__support/libc.test.src.__support.freelist_test.__hermetic__.__build__
[==========] Running 9 tests from 1 test suite.
[ RUN      ] LlvmLibcFreeList.EmptyListHasNoMembers
[       OK ] LlvmLibcFreeList.EmptyListHasNoMembers (6 us)
[ RUN      ] LlvmLibcFreeList.CanRetrieveAddedMember
[       OK ] LlvmLibcFreeList.CanRetrieveAddedMember (12 us)
[ RUN      ] LlvmLibcFreeList.CanRetrieveAddedMemberForSmallerSize
[       OK ] LlvmLibcFreeList.CanRetrieveAddedMemberForSmallerSize (10 us)
[ RUN      ] LlvmLibcFreeList.CanRemoveItem
[       OK ] LlvmLibcFreeList.CanRemoveItem (10 us)
[ RUN      ] LlvmLibcFreeList.FindReturnsSmallestChunk
[       OK ] LlvmLibcFreeList.FindReturnsSmallestChunk (25 us)
[ RUN      ] LlvmLibcFreeList.FindReturnsCorrectChunkInSameBucket
[       OK ] LlvmLibcFreeList.FindReturnsCorrectChunkInSameBucket (12 us)
[ RUN      ] LlvmLibcFreeList.FindCanMoveUpThroughBuckets
/ssd/cuda-builder/work/llvm-project/libc/utils/gpu/loader/nvptx/Loader.cpp:339:0: Error: misaligned address
[613/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_us_test.__hermetic__.__build__
[614/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_ul_test.__hermetic__.__build__
[615/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_ui_test.__hermetic__.__build__
[616/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_width_ull_test.__hermetic__.__build__
[617/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_us_test.__hermetic__.__build__
[618/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_ul_test.__hermetic__.__build__
[619/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_uc_test.__hermetic__.__build__
[620/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_ceil_uc_test.__hermetic__.__build__
[621/1022] Linking CXX executable libc/test/src/stdbit/libc.test.src.stdbit.stdc_bit_floor_ull_test.__hermetic__.__build__
ninja: build stopped: subcommand failed.
++ err=1
++ echo PID 87: subprocess exited with error 1
++ exit 1
PID 87: subprocess exited with error 1
+ step_failure
+ echo @@@STEP_FAILURE@@@
program finished with exit code 0
elapsedTime=649.222476

AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
The passed SCC is the current SCC we're working on.
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 23, 2024
The passed SCC is the current SCC we're working on.

(cherry picked from commit 0555afd)
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 23, 2024
The passed SCC is the current SCC we're working on.

(cherry picked from commit 0555afd)
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 26, 2024
The passed SCC is the current SCC we're working on.

(cherry picked from commit 0555afd)
anton-bannykh pushed a commit to Kotlin/llvm-project that referenced this pull request Aug 26, 2024
The passed SCC is the current SCC we're working on.

(cherry picked from commit 0555afd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:analysis Includes value tracking, cost tables and constant folding mlgo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants