Skip to content

Fix nested always-inline call chains - #976

Open
fbernier wants to merge 1 commit into
rust-lang:masterfrom
fbernier:fix/nested-always-inline
Open

fbernier wants to merge 1 commit into
rust-lang:masterfrom
fbernier:fix/nested-always-inline

Conversation

@fbernier

Copy link
Copy Markdown
Contributor

Preserve #[inline(always)] for nested, non-recursive calls by detecting cycles instead of treating any always-inline callee as recursion. The traversal is iterative and cached.

Add an -O0 assembly regression. Existing tests cover self-recursion and mutual recursion.

@rustbot

This comment has been minimized.

Detect cycles instead of treating every nested always-inline call as recursive. Cache results and keep the traversal on the heap.

Add an -O0 assembly regression for acyclic chains. Retain the existing always_inline runtime test for self-recursion and mutual recursion.
@fbernier
fbernier force-pushed the fix/nested-always-inline branch from b3a2235 to 935c4f4 Compare September 15, 2026 02:19
@rustbot

rustbot commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants