Skip to content

Stop needing an alloca for catch_unwind#156867

Open
scottmcm wants to merge 1 commit into
rust-lang:mainfrom
scottmcm:WIP-no-alloca-for-catch-unwind
Open

Stop needing an alloca for catch_unwind#156867
scottmcm wants to merge 1 commit into
rust-lang:mainfrom
scottmcm:WIP-no-alloca-for-catch-unwind

Conversation

@scottmcm
Copy link
Copy Markdown
Member

@scottmcm scottmcm commented May 24, 2026

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
Copy link
Copy Markdown
Collaborator

rustbot commented May 24, 2026

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
Copy link
Copy Markdown
Collaborator

rustbot commented May 24, 2026

The Miri subtree was changed

cc @rust-lang/miri

@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 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
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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants