Skip to content

refactor CTFE-specific intrinsics to different file - #166160

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Tess4552:refactor-ctfe-intrinsics
Nov 20, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Tess4552:refactor-ctfe-intrinsics

Conversation

@Tess4552

Copy link
Copy Markdown
Contributor

Refactors CFTE-specific intrinsics out of machine.rs. The list of intrinsics is getting long enough to warrant a refactor.

r? @oli-obk

@rustbot

rustbot commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@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 Nov 18, 2026
@rust-log-analyzer

This comment has been minimized.

@Tess4552
Tess4552 force-pushed the refactor-ctfe-intrinsics branch from c92ec66 to b4b6111 Compare November 18, 2026 20:14
}
}

sym::type_id_vtable => {

@oli-obk oli-obk Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should also have a separate file just for the type_id* intrinsics

View changes since the review

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 19, 2026
@rustbot

rustbot commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 19, 2026
@Tess4552
Tess4552 force-pushed the refactor-ctfe-intrinsics branch from b4b6111 to fca288e Compare November 19, 2026 11:32
@Tess4552

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 19, 2026

@oli-obk oli-obk left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rust-bors

rust-bors Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit fca288e has been tentatively approved by oli-obk

It will be put into the queue for this repository once PR CI succeeds.

@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 Nov 19, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 19, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #157721 (compiletest: Add testing for lint machinery at runtime)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166117 (Remove ebadf handling from stdio)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165971 (fix: non-deterministic temporary object paths in linker maps)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
rust-bors Bot pushed a commit that referenced this pull request Nov 19, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #166078 (rustc_type_ir: Optimize `sub_root_lookup_table` by using `SsoHashMap`, not `HashMap`)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - #166117 (Remove ebadf handling from stdio)
 - #166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165971 (fix: non-deterministic temporary object paths in linker maps)
 - #166064 (Add const generic transmute min support)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
Rollup of 21 pull requests

Successful merges:

 - #165707 (bootstrap: Make low priority the default)
 - #165716 (Refactor split_block in check_pointers to avoid Terminator: None)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - #166069 (bootstrap: fix keep-stage-std)
 - #166117 (Remove ebadf handling from stdio)
 - #166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165802 (Add CI workflow to publish backtrace after a push to main)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165906 (fix ICE when a forced keyword follows a parameter pattern)
 - #166064 (Add const generic transmute min support)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166158 (bump some tools' `toml` dependency)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)
 - #166210 (Avoid terminator: None in insert_direct_enum_check)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
Rollup of 20 pull requests

Successful merges:

 - #165716 (Refactor split_block in check_pointers to avoid Terminator: None)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - #166069 (bootstrap: fix keep-stage-std)
 - #166117 (Remove ebadf handling from stdio)
 - #166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165802 (Add CI workflow to publish backtrace after a push to main)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165906 (fix ICE when a forced keyword follows a parameter pattern)
 - #166064 (Add const generic transmute min support)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166158 (bump some tools' `toml` dependency)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)
 - #166210 (Avoid terminator: None in insert_direct_enum_check)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 20, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 20, 2026
@Tess4552
Tess4552 force-pushed the refactor-ctfe-intrinsics branch from fca288e to 2b39876 Compare November 20, 2026 07:45
@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@Tess4552
Tess4552 force-pushed the refactor-ctfe-intrinsics branch from 2b39876 to afa8a75 Compare November 20, 2026 14:05
@rustbot

rustbot commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Tess4552

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 20, 2026
@oli-obk

oli-obk commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

📌 Commit afa8a75 has been tentatively approved by oli-obk

It will be put into the queue for this repository once PR CI succeeds.

@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 Nov 20, 2026
@oli-obk

oli-obk commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@bors delegate+

in case it needs more rebases ;)

@rust-bors

rust-bors Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

✌️ @Tess4552, you can now approve this pull request!

If @oli-obk told you to "r=me" after making some further change, then please make that change and post @bors r=oli-obk.

View changes since this delegation.

rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #166195 (std: two small improvements to UNIX stack overflow logic)
 - #165707 (bootstrap: Make low priority the default)
 - #166160 (refactor CTFE-specific intrinsics to different file)
 - #166260 ([PAC] Ignore run-make tests that expect static linking on `pauthtest`)
@rust-bors
rust-bors Bot merged commit 671fb31 into rust-lang:main Nov 20, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
Rollup merge of #166160 - Tess4552:refactor-ctfe-intrinsics, r=oli-obk

refactor CTFE-specific intrinsics to different file

Refactors CFTE-specific intrinsics out of `machine.rs`. The list of intrinsics is getting long enough to warrant a refactor.

r? @oli-obk
@rust-timer

Copy link
Copy Markdown
Collaborator

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (8094772): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.1% [0.1%, 0.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-1.1%, -0.1%] 8
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (secondary 3.0%)

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)
6.4% [4.2%, 8.8%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.9% [-4.7%, -3.1%] 2
All ❌✅ (primary) - - 0

Binary size

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

Artifact size: 406.02 MiB -> 405.37 MiB (-0.16%)

@rustbot rustbot added the perf-regression Performance regression. label Nov 20, 2026
folkertdev pushed a commit to folkertdev/stdarch that referenced this pull request Nov 22, 2026
Rollup of 20 pull requests

Successful merges:

 - rust-lang/rust#165716 (Refactor split_block in check_pointers to avoid Terminator: None)
 - rust-lang/rust#165934 (Avoid using Terminator:None in simplify_cfg)
 - rust-lang/rust#166050 (Use attribute parser for lang attributes in `LateResolutionVisitor`)
 - rust-lang/rust#166069 (bootstrap: fix keep-stage-std)
 - rust-lang/rust#166117 (Remove ebadf handling from stdio)
 - rust-lang/rust#166119 (Avoid an ICE on re-exports of private imports without a DefId)
 - rust-lang/rust#165094 (reflection: doc attributes from adts, fields, and variants)
 - rust-lang/rust#165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - rust-lang/rust#165694 (view-types: make sure view types are !Sized)
 - rust-lang/rust#165802 (Add CI workflow to publish backtrace after a push to main)
 - rust-lang/rust#165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - rust-lang/rust#165906 (fix ICE when a forced keyword follows a parameter pattern)
 - rust-lang/rust#166064 (Add const generic transmute min support)
 - rust-lang/rust#166136 (Move ub_checks() inside the const_eval_select branch.)
 - rust-lang/rust#166158 (bump some tools' `toml` dependency)
 - rust-lang/rust#166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - rust-lang/rust#166176 (compiletest: Move all code out of the crate root)
 - rust-lang/rust#166185 (simd-test: Fix cfg syntax in the test macro)
 - rust-lang/rust#166194 (std: Unstably constify `std::process::abort`)
 - rust-lang/rust#166210 (Avoid terminator: None in insert_direct_enum_check)

Failed merges:

 - rust-lang/rust#166150 (Reflection: refactor Type and TypeKind)
 - rust-lang/rust#166160 (refactor CTFE-specific intrinsics to different file)
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Nov 23, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#166195 (std: two small improvements to UNIX stack overflow logic)
 - rust-lang/rust#165707 (bootstrap: Make low priority the default)
 - rust-lang/rust#166160 (refactor CTFE-specific intrinsics to different file)
 - rust-lang/rust#166260 ([PAC] Ignore run-make tests that expect static linking on `pauthtest`)
@panstromek

Copy link
Copy Markdown
Contributor

perf triage:

include-blob regression is noise.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

6 participants