Skip to content

Conversation

@s-barannikov
Copy link
Contributor

Also, rename getCurPreheader -> getOrCreatePreheader to make it clear that this method may alter CFG.

Update Changed if the method modified a loop by splitting a critical edge (this change is not strictly NFC).

The removed parameter was probably intended to save compile time by not trying to a critical edge after the first attempt has failed, but it is only tried once per loop.

Also, rename `getCurPreheader` -> `getOrCreatePreheader` to make it
clear that this method may alter CFG.

Update `Changed` if the method modified a loop by splitting a critical
edge (this change is not strictly NFC).

The removed parameter was probably intended to save compile time by not
trying to a critical edge after the first attempt has failed, but it is
only tried once per loop.
@s-barannikov s-barannikov requested review from arsenm and topperc April 13, 2025 17:58
Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@s-barannikov s-barannikov merged commit c3959f2 into llvm:main Apr 15, 2025
12 checks passed
@s-barannikov s-barannikov deleted the licm/unused-cur-preheader branch April 15, 2025 02:03
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 15, 2025
… nullptr (#135554)

Also, rename `getCurPreheader` -> `getOrCreatePreheader` to make it
clear that this method may alter CFG.

Update `Changed` if the method modified a loop by splitting a critical
edge (this change is not strictly NFC).

The removed parameter was probably intended to save compile time by not
trying to a critical edge after the first attempt has failed, but it is
only tried once per loop.

PR: llvm/llvm-project#135554
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 15, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-qemu running on sanitizer-buildbot4 while building llvm at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[75/77] Generating ScudoUnitTestsObjects.combined_test.cpp.mips64.o
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
[76/77] Generating ScudoUnitTest-mips64-Test
[76/77] Running Scudo Standalone tests
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 159 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
TIMEOUT: ScudoStandalone-Unit :: ./ScudoUnitTest-mips64-Test/69/141 (159 of 159)
******************** TEST 'ScudoStandalone-Unit :: ./ScudoUnitTest-mips64-Test/69/141' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_debug_mips64_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64-Test-ScudoStandalone-Unit-1300123-69-141.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=141 GTEST_SHARD_INDEX=69 /home/b/sanitizer-x86_64-linux-qemu/build/qemu_build/qemu-mips64 -L /usr/mips64-linux-gnuabi64 /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_debug_mips64_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64-Test
--

Note: This is test shard 70 of 141.
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 1 test from ScudoCombinedDeathTestBasicCombined14_DefaultConfig
[ RUN      ] ScudoCombinedDeathTestBasicCombined14_DefaultConfig.BasicCombined14
Stats: SizeClassAllocator64: 2M mapped (0M rss) in 34 allocations; remains 34; ReleaseToOsIntervalMs = 5000
  00 (   128): mapped:    256K popped:      24 pushed:       0 inuse:     24 total:     64 releases attempted:      0 last released:      0K latest pushed bytes:      5K region: 0x555956875000 (0x555956869000)
  32 ( 16384): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    112K region: 0x555d56875000 (0x555d56869000)
  33 ( 20480): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    140K region: 0x55615686a000 (0x556156869000)
  34 ( 24576): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    168K region: 0x556c5686e000 (0x556c56869000)
  35 ( 28672): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    196K region: 0x55635686a000 (0x556356869000)
  36 ( 32768): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    224K region: 0x558156873000 (0x558156869000)
  37 ( 40960): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      6 releases attempted:      0 last released:      0K latest pushed bytes:    200K region: 0x55685686f000 (0x556856869000)
  38 ( 49152): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      5 releases attempted:      0 last released:      0K latest pushed bytes:    192K region: 0x557456878000 (0x557456869000)
  39 ( 57344): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      4 releases attempted:      0 last released:      0K latest pushed bytes:    168K region: 0x555b56872000 (0x555b56869000)
  41 ( 81920): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      3 releases attempted:      0 last released:      0K latest pushed bytes:    160K region: 0x557756879000 (0x557756869000)
  42 ( 98304): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      2 releases attempted:      0 last released:      0K latest pushed bytes:     96K region: 0x557f56875000 (0x557f56869000)
Stats: MapAllocator: allocated 0 times (0K), freed 0 times (0K), remains 0 (0K) max 0M, Fragmented 0K
Stats: MapAllocatorCache: EntriesCount: 0, MaxEntriesCount: 32, MaxEntrySize: 524288, ReleaseToOsSkips: 0, ReleaseToOsIntervalMs = 5000
Stats: CacheRetrievalStats: SuccessRate: 0/0 (100.00%)
Cache Entry Info (Most Recent -> Least Recent):
Stats: Quarantine: batches: 0; bytes: 0 (user: 0); chunks: 0 (capacity: 0); 0% chunks used; 0% memory overhead
Quarantine limits: global: 0K; thread local: 0K
Exclusive TSD don't support iterating each TSD
Fragmentation Stats: SizeClassAllocator64: page size = 4096 bytes
  01 (    32): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  02 (    64): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  03 (    96): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  04 (   128): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  05 (   160): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  06 (   192): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  07 (   224): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  08 (   256): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
Step 22 (scudo debug_mips64_qemu) failure: scudo debug_mips64_qemu (failure)
...
[75/77] Generating ScudoUnitTestsObjects.combined_test.cpp.mips64.o
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
clang++: warning: -Wl,-z,execstack: 'linker' input unused [-Wunused-command-line-argument]
[76/77] Generating ScudoUnitTest-mips64-Test
[76/77] Running Scudo Standalone tests
llvm-lit: /home/b/sanitizer-x86_64-linux-qemu/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 159 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
TIMEOUT: ScudoStandalone-Unit :: ./ScudoUnitTest-mips64-Test/69/141 (159 of 159)
******************** TEST 'ScudoStandalone-Unit :: ./ScudoUnitTest-mips64-Test/69/141' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:/home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_debug_mips64_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64-Test-ScudoStandalone-Unit-1300123-69-141.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=141 GTEST_SHARD_INDEX=69 /home/b/sanitizer-x86_64-linux-qemu/build/qemu_build/qemu-mips64 -L /usr/mips64-linux-gnuabi64 /home/b/sanitizer-x86_64-linux-qemu/build/llvm_build2_debug_mips64_qemu/lib/scudo/standalone/tests/./ScudoUnitTest-mips64-Test
--

Note: This is test shard 70 of 141.
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 1 test from ScudoCombinedDeathTestBasicCombined14_DefaultConfig
[ RUN      ] ScudoCombinedDeathTestBasicCombined14_DefaultConfig.BasicCombined14
Stats: SizeClassAllocator64: 2M mapped (0M rss) in 34 allocations; remains 34; ReleaseToOsIntervalMs = 5000
  00 (   128): mapped:    256K popped:      24 pushed:       0 inuse:     24 total:     64 releases attempted:      0 last released:      0K latest pushed bytes:      5K region: 0x555956875000 (0x555956869000)
  32 ( 16384): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    112K region: 0x555d56875000 (0x555d56869000)
  33 ( 20480): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    140K region: 0x55615686a000 (0x556156869000)
  34 ( 24576): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    168K region: 0x556c5686e000 (0x556c56869000)
  35 ( 28672): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    196K region: 0x55635686a000 (0x556356869000)
  36 ( 32768): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      8 releases attempted:      0 last released:      0K latest pushed bytes:    224K region: 0x558156873000 (0x558156869000)
  37 ( 40960): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      6 releases attempted:      0 last released:      0K latest pushed bytes:    200K region: 0x55685686f000 (0x556856869000)
  38 ( 49152): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      5 releases attempted:      0 last released:      0K latest pushed bytes:    192K region: 0x557456878000 (0x557456869000)
  39 ( 57344): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      4 releases attempted:      0 last released:      0K latest pushed bytes:    168K region: 0x555b56872000 (0x555b56869000)
  41 ( 81920): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      3 releases attempted:      0 last released:      0K latest pushed bytes:    160K region: 0x557756879000 (0x557756869000)
  42 ( 98304): mapped:    256K popped:       1 pushed:       0 inuse:      1 total:      2 releases attempted:      0 last released:      0K latest pushed bytes:     96K region: 0x557f56875000 (0x557f56869000)
Stats: MapAllocator: allocated 0 times (0K), freed 0 times (0K), remains 0 (0K) max 0M, Fragmented 0K
Stats: MapAllocatorCache: EntriesCount: 0, MaxEntriesCount: 32, MaxEntrySize: 524288, ReleaseToOsSkips: 0, ReleaseToOsIntervalMs = 5000
Stats: CacheRetrievalStats: SuccessRate: 0/0 (100.00%)
Cache Entry Info (Most Recent -> Least Recent):
Stats: Quarantine: batches: 0; bytes: 0 (user: 0); chunks: 0 (capacity: 0); 0% chunks used; 0% memory overhead
Quarantine limits: global: 0K; thread local: 0K
Exclusive TSD don't support iterating each TSD
Fragmentation Stats: SizeClassAllocator64: page size = 4096 bytes
  01 (    32): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  02 (    64): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  03 (    96): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  04 (   128): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  05 (   160): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  06 (   192): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  07 (   224): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%
  08 (   256): inuse/total blocks:      0/     0 inuse/total pages:      0/     0 inuse bytes:      0K util: 100.00%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants