Skip to content

Remove terminating_scopes hash set. #139067

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
Mar 29, 2025

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Mar 28, 2025

Instead of inserting and checking ids in a hashset, we can just pass a boolean as argument.

For example:

-    visitor.terminating_scopes.insert(arm.hir_id.local_id);
-    visitor.enter_node_scope_with_dtor(arm.hir_id.local_id);
+    visitor.enter_node_scope_with_dtor(arm.hir_id.local_id, true);

@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 28, 2025
@m-ou-se
Copy link
Member Author

m-ou-se commented Mar 28, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 28, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 28, 2025
…t, r=<try>

Remove `terminating_scopes` hash set.

Instead of inserting and checking ids in a hashset, we can just pass a boolean as argument.
@bors
Copy link
Collaborator

bors commented Mar 28, 2025

⌛ Trying commit 873c71d with merge 898b576...

@bors
Copy link
Collaborator

bors commented Mar 28, 2025

☀️ Try build successful - checks-actions
Build commit: 898b576 (898b57642f4ea426aced59e0b32e0ed8fa15b7ab)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (898b576): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
-0.4% [-2.3%, -0.1%] 9
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 1

Max RSS (memory usage)

Results (primary -0.9%, secondary 2.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% [-0.9%, -0.9%] 1

Cycles

Results (primary 2.4%, secondary -1.7%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 777.292s -> 776.581s (-0.09%)
Artifact size: 365.95 MiB -> 365.96 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 28, 2025
@m-ou-se m-ou-se mentioned this pull request Mar 28, 2025
29 tasks
@m-ou-se m-ou-se force-pushed the terminating-scopes-no-hashset branch from 873c71d to 122d7e1 Compare March 28, 2025 21:50
@wesleywiser
Copy link
Member

This is a really nice cleanup!

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 28, 2025

📌 Commit 122d7e1 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2025
@bors
Copy link
Collaborator

bors commented Mar 29, 2025

⌛ Testing commit 122d7e1 with merge 0442f9f...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
…t, r=wesleywiser

Remove `terminating_scopes` hash set.

Instead of inserting and checking ids in a hashset, we can just pass a boolean as argument.

For example:

```diff
-    visitor.terminating_scopes.insert(arm.hir_id.local_id);
-    visitor.enter_node_scope_with_dtor(arm.hir_id.local_id);
+    visitor.enter_node_scope_with_dtor(arm.hir_id.local_id, true);
```
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [ui] tests\ui\amdgpu-require-explicit-cpu.rs#cpu stdout ----

error in revision `cpu`: test compilation failed although it shouldn't!
status: exit code: 1
command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin;D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage0-bootstrap-tools\x86_64-pc-windows-gnu\release\deps;D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage0\bin;D:\a\rust\rust\ninja;D:\a\rust\rust\mingw64\bin;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\3.3.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.13\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.0.7\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.442-6\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.9\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "D:\\a\\rust\\rust\\tests\\ui\\amdgpu-require-explicit-cpu.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=D:\\a\\rust\\rust\\vendor" "--sysroot" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2" "--cfg" "cpu" "--check-cfg" "cfg(test,FALSE,nocpu,cpu)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--out-dir" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui\\amdgpu-require-explicit-cpu.cpu" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "--crate-type=cdylib" "--target=amdgcn-amd-amdhsa" "-Ctarget-cpu=gfx900"
stdout: none
--- stderr -------------------------------
error: linking with `rust-lld` failed: exit code: 0xc0000374
   |
   = note: "rust-lld" "-flavor" "gnu" "--version-script=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcHa3GiK\\list" "--no-undefined-version" "<1 object files omitted>" "--as-needed" "-L" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcHa3GiK\\raw-dylibs" "-Bdynamic" "--eh-frame-hdr" "-z" "noexecstack" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "-o" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui\\amdgpu-require-explicit-cpu.cpu\\amdgpu_require_explicit_cpu.elf" "--gc-sections" "-shared" "--strip-debug"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: 

error: aborting due to 1 previous error
------------------------------------------
---
test result: FAILED. 18512 passed; 1 failed; 286 ignored; 0 measured; 23 filtered out; finished in 1074.98s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-gnu target=x86_64-pc-windows-gnu
Build completed unsuccessfully in 1:35:14
make: *** [Makefile:128: ci-mingw-x] Error 1
  local time: Sat Mar 29 05:03:59 CUT 2025
  network time: Sat, 29 Mar 2025 05:03:59 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Mar 29, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 29, 2025
@m-ou-se
Copy link
Member Author

m-ou-se commented Mar 29, 2025

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 29, 2025
@bors
Copy link
Collaborator

bors commented Mar 29, 2025

⌛ Testing commit 122d7e1 with merge 8989165...

@bors
Copy link
Collaborator

bors commented Mar 29, 2025

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing 8989165 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 29, 2025
@bors bors merged commit 8989165 into rust-lang:master Mar 29, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Mar 29, 2025
@m-ou-se m-ou-se deleted the terminating-scopes-no-hashset branch March 29, 2025 13:41
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 928468c (parent) -> 8989165 (this PR)

Test differences

Show 1 test diff

Stage 2

  • [run-make] tests/run-make/compressed-debuginfo-zstd: ignore (ignored if LLVM wasn't build with zstd for ELF section compression (we want LLVM/LLD to be built with zstd support)) -> pass (J0)

Job group index

  • J0: x86_64-gnu-nopt

Job duration changes

  1. dist-apple-various: 7107.3s -> 7827.2s (10.1%)
  2. dist-powerpc-linux: 5232.1s -> 5540.6s (5.9%)
  3. i686-mingw-3: 7933.6s -> 8256.4s (4.1%)
  4. i686-mingw-2: 6612.1s -> 6861.6s (3.8%)
  5. i686-gnu-nopt-2: 6258.8s -> 6479.8s (3.5%)
  6. dist-i686-msvc: 6829.9s -> 6973.6s (2.1%)
  7. dist-x86_64-msvc-alt: 7316.3s -> 7460.2s (2.0%)
  8. x86_64-gnu-llvm-19-2: 5911.4s -> 6021.3s (1.9%)
  9. x86_64-msvc-2: 6862.8s -> 6970.3s (1.6%)
  10. i686-mingw-1: 7295.8s -> 7408.6s (1.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8989165): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 1
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.1%] 9
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 1

Max RSS (memory usage)

Results (primary -1.0%, secondary 1.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
-3.1% [-3.1%, -3.1%] 1
Improvements ✅
(secondary)
-0.9% [-0.9%, -0.9%] 1
All ❌✅ (primary) -1.0% [-3.1%, 1.0%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 777.895s -> 777.788s (-0.01%)
Artifact size: 365.92 MiB -> 365.94 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-spurious-fail-rust-lld-crash CI spurious failure: `rust-lld` crashing / SIGSEGV / 0xc0000374 heap corruption merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants