Skip to content

Stop needing an alloca for catch_unwind#156867

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scottmcm:WIP-no-alloca-for-catch-unwind
May 29, 2026
Merged

Stop needing an alloca for catch_unwind#156867
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scottmcm:WIP-no-alloca-for-catch-unwind

Conversation

@scottmcm

@scottmcm scottmcm commented May 24, 2026

Copy link
Copy Markdown
Member

View all comments

Turns out these were all making OperandValue::Immediates already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle.

cc #153250 rust-lang/compiler-team#970

While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a bool and taking a generic pointee and unsafe fns cleans up the call in std a bit without making the implementation in the backend any harder.

r? dianqk

@rustbot

rustbot commented May 24, 2026

Copy link
Copy Markdown
Collaborator

The GCC codegen subtree was changed

cc @antoyo, @GuillaumeGomez

The Cranelift subtree was changed

cc @bjorn3

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 24, 2026
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the WIP-no-alloca-for-catch-unwind branch from 2a1bb44 to 13ccf4f Compare May 24, 2026 04:41
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the WIP-no-alloca-for-catch-unwind branch from 13ccf4f to 31eb9f4 Compare May 24, 2026 06:18
@rustbot

rustbot commented May 24, 2026

Copy link
Copy Markdown
Collaborator

The Miri subtree was changed

cc @rust-lang/miri

@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the WIP-no-alloca-for-catch-unwind branch from 31eb9f4 to 6adeeb5 Compare May 24, 2026 07:20
@rust-log-analyzer

This comment was marked as resolved.

@scottmcm scottmcm closed this May 24, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 24, 2026
@scottmcm scottmcm reopened this May 24, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 24, 2026

@dianqk dianqk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM except for std. I don't know how to review a nightly public API change.

View changes since this review

@dianqk

This comment was marked as outdated.

@rustbot

This comment was marked as outdated.

@dianqk

dianqk commented May 26, 2026

Copy link
Copy Markdown
Member

r? libs

@rustbot rustbot assigned Mark-Simulacrum and unassigned dianqk May 26, 2026
@joboet

joboet commented May 28, 2026

Copy link
Copy Markdown
Member

I think that intrinsics are considered private implementation details, not public API, so this doesn't need any special approval.

@bors r=@dianqk
r? @dianqk

@rust-bors

rust-bors Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6adeeb5 has been approved by dianqk

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 28, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 28, 2026
@rust-bors

rust-bors Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

💔 Test for d5e693f failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle.

While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder.
@scottmcm scottmcm force-pushed the WIP-no-alloca-for-catch-unwind branch from 6adeeb5 to 6aa9c03 Compare May 29, 2026 02:54
@scottmcm

Copy link
Copy Markdown
Member Author

@bors try jobs=test-various

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
Stop needing an alloca for `catch_unwind`


try-job: test-various
@rust-bors

rust-bors Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 19917ba (19917ba4918b73f0256f72eaa148e1ae021eaf23, parent: cced03bfd61a304243a34504618ecec86c17063f)

@scottmcm

Copy link
Copy Markdown
Member Author

@bors r=@dianqk

@rust-bors

rust-bors Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6aa9c03 has been approved by dianqk

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 29, 2026
rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #156867 (Stop needing an alloca for `catch_unwind`)
 - #157050 (Couple of changes to help with moving LTO to the link phase)
 - #148345 (add inline to copy_within)
 - #156931 (Add splitting caveats to `{read,write}_volatile`)
 - #156980 (Add frame pointer annotations to the module)
 - #156991 ([AIX] Sync compiler and std with libc changes)
 - #157008 (Avoid some symbol interning)
 - #157038 (android: implement file locking by calling flock)
 - #157071 (Fix `cfg` typo in rustdoc book)
 - #157080 (Fix typo in Rustdoc release notes)
 - #157084 (Clean up error reporting for impl Drop enum casts)
 - #157091 (Remove minicore ping for myself)
@rust-bors

rust-bors Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 6aa9c03 with merge a670fe9...

Workflow: https://github.com/rust-lang/rust/actions/runs/26628198475

rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
…anqk

Stop needing an alloca for `catch_unwind`



Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle.

cc #153250 rust-lang/compiler-team#970

While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder.

r? dianqk
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors yield
Yielding to enclosing rollup

@rust-bors

rust-bors Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Auto build was cancelled. Cancelled workflows:

The next pull request likely to be tested is #157072.

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

Rollup of 12 pull requests

Successful merges:

 - #156867 (Stop needing an alloca for `catch_unwind`)
 - #157050 (Couple of changes to help with moving LTO to the link phase)
 - #148345 (add inline to copy_within)
 - #156931 (Add splitting caveats to `{read,write}_volatile`)
 - #156980 (Add frame pointer annotations to the module)
 - #156991 ([AIX] Sync compiler and std with libc changes)
 - #157008 (Avoid some symbol interning)
 - #157038 (android: implement file locking by calling flock)
 - #157071 (Fix `cfg` typo in rustdoc book)
 - #157080 (Fix typo in Rustdoc release notes)
 - #157084 (Clean up error reporting for impl Drop enum casts)
 - #157091 (Remove minicore ping for myself)
@rust-bors rust-bors Bot merged commit 0f27774 into rust-lang:main May 29, 2026
13 of 14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone May 29, 2026
rust-timer added a commit that referenced this pull request May 29, 2026
Rollup merge of #156867 - scottmcm:WIP-no-alloca-for-catch-unwind, r=dianqk

Stop needing an alloca for `catch_unwind`

Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle.

cc #153250 rust-lang/compiler-team#970

While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder.

r? dianqk
@scottmcm scottmcm deleted the WIP-no-alloca-for-catch-unwind branch May 29, 2026 16:47
phraakture pushed a commit to phraakture/miri that referenced this pull request May 30, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#156867 (Stop needing an alloca for `catch_unwind`)
 - rust-lang/rust#157050 (Couple of changes to help with moving LTO to the link phase)
 - rust-lang/rust#148345 (add inline to copy_within)
 - rust-lang/rust#156931 (Add splitting caveats to `{read,write}_volatile`)
 - rust-lang/rust#156980 (Add frame pointer annotations to the module)
 - rust-lang/rust#156991 ([AIX] Sync compiler and std with libc changes)
 - rust-lang/rust#157008 (Avoid some symbol interning)
 - rust-lang/rust#157038 (android: implement file locking by calling flock)
 - rust-lang/rust#157071 (Fix `cfg` typo in rustdoc book)
 - rust-lang/rust#157080 (Fix typo in Rustdoc release notes)
 - rust-lang/rust#157084 (Clean up error reporting for impl Drop enum casts)
 - rust-lang/rust#157091 (Remove minicore ping for myself)
purplesyringa added a commit to iex-rs/lithium that referenced this pull request May 31, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 6, 2026
…nwind, r=dianqk

Stop needing an alloca for `catch_unwind`

Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle.

cc rust-lang#153250 rust-lang/compiler-team#970

While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder.

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. T-libs Relevant to the library 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