Skip to content

Split apply_primary_terminator_effect - #160555

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
nnethercote:split-apply_terminator
Aug 6, 2026
Merged

Split apply_primary_terminator_effect#160555
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
nnethercote:split-apply_terminator

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

It currently does two distinct things, and it's a bit nicer it they are separated. Details in individual commits.

r? @cjgillot

This method currently does two things: it applies the effect, and also
computes the edges. However:
- Three of the four call sites don't use the edges.
- Most analyses just return `terminator.edges()` unconditionally.

This commit separates the edge computation into a new method,
`get_terminator_edges()`. It defaults to `terminator.edges()`, which
means that most analyses don't need to define it. And now edges are only
obtained when they are needed (in `Forward::apply_effects_in_block`).
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred to constck

cc @fee1-dead

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Aug 5, 2026
@cjgillot

cjgillot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6377970 has been approved by cjgillot

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 5, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 6, 2026
…, r=cjgillot

Split `apply_primary_terminator_effect`

It currently does two distinct things, and it's a bit nicer it they are separated. Details in individual commits.

r? @cjgillot
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
…, r=cjgillot

Split `apply_primary_terminator_effect`

It currently does two distinct things, and it's a bit nicer it they are separated. Details in individual commits.

r? @cjgillot
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
…, r=cjgillot

Split `apply_primary_terminator_effect`

It currently does two distinct things, and it's a bit nicer it they are separated. Details in individual commits.

r? @cjgillot
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
…, r=cjgillot

Split `apply_primary_terminator_effect`

It currently does two distinct things, and it's a bit nicer it they are separated. Details in individual commits.

r? @cjgillot
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 6, 2026
…, r=cjgillot

Split `apply_primary_terminator_effect`

It currently does two distinct things, and it's a bit nicer it they are separated. Details in individual commits.

r? @cjgillot
rust-bors Bot pushed a commit that referenced this pull request Aug 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #159530 (Cap socket send length to c_int::MAX on Apple targets)
 - #159506 (Allow associated const equality constraints with GCA)
 - #160006 (Account for desugaring in method call move errors)
 - #160415 (Split `aarch64-apple{,-macos-26}` => `aarch64-apple{,-macos-26}-{1,2}` jobs)
 - #160464 (fix: Check the fallback map before queueing child in `visible_parent_map` breadth-first search)
 - #160555 (Split `apply_primary_terminator_effect`)
 - #160592 (Suggest if-let chain continuation on unclosed delimiter)
 - #160600 (Avoid the std DLL copy alongside rustc)
 - #160156 (check_consts: exhaustively match on CastKind)
 - #160211 (Rename `#[unroll]` => `#[rustc_unroll]` to mitigate nameres ambiguity)
 - #160304 (Add tests for fixed new solver issues)
 - #160398 (rustc_abi: Add `LayoutData::is_variant_uninhabited` method)
 - #160546 (Update error message in documentation comments)
 - #160568 (Use `VisitorResult` helper macros)
 - #160571 (Add regression test for array type recovery in generic arguments)
 - #160588 (add a test showing polonius alpha is not a subset of datalog polonius)
 - #160617 (Add a suggestion to MissingUnsafeOnExtern diagnostic)
@rust-bors
rust-bors Bot merged commit 84127af into rust-lang:main Aug 6, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 6, 2026
rust-timer added a commit that referenced this pull request Aug 6, 2026
Rollup merge of #160555 - nnethercote:split-apply_terminator, r=cjgillot

Split `apply_primary_terminator_effect`

It currently does two distinct things, and it's a bit nicer it they are separated. Details in individual commits.

r? @cjgillot
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@rust-timer build cf26d9b

@rust-timer

This comment has been minimized.

@nnethercote
nnethercote deleted the split-apply_terminator branch August 6, 2026 21:22
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (cf26d9b): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.4%, -0.2%] 6
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.3%] 13
All ❌✅ (primary) -0.3% [-0.4%, -0.2%] 6

Max RSS (memory usage)

Results (primary -3.0%, secondary -2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.6% [2.6%, 2.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.9% [-6.8%, -4.9%] 2
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) -3.0% [-6.8%, 2.6%] 3

Cycles

Results (secondary -4.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

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

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 458.35s -> 466.214s (1.72%)
Artifact size: 398.64 MiB -> 398.58 MiB (-0.01%)

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

Labels

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.

5 participants