Skip to content

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jan 7, 2026

This removes support for extern "unadjusted" for anything other than LLVM intrinsics. It only makes sense in the context of calling LLVM intrinsics anyway as it exposes the way the LLVM backend internally represents types. Perhaps it should be renamed to extern "llvm-intrinsic"?

Follow up to #148533

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 7, 2026
@bjorn3
Copy link
Member Author

bjorn3 commented Jan 7, 2026

cc @sayantn this would make #140763 a tiny bit simpler I think. You don't have to modify compiler/rustc_codegen_llvm/src/abi.rs anymore.

@bjorn3 bjorn3 marked this pull request as ready for review January 7, 2026 16:11
@rustbot
Copy link
Collaborator

rustbot commented Jan 7, 2026

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@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 Jan 7, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 7, 2026

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the llvm_intrinsic_no_fn_abi branch 2 times, most recently from fb63e0c to af005a9 Compare January 7, 2026 16:30
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the llvm_intrinsic_no_fn_abi branch 2 times, most recently from e48fbd3 to b05795a Compare January 7, 2026 17:53
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the llvm_intrinsic_no_fn_abi branch from b05795a to 83e77ec Compare January 7, 2026 18:44
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the llvm_intrinsic_no_fn_abi branch from 83e77ec to f1ab003 Compare January 8, 2026 10:47
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2026

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.

@bjorn3 bjorn3 changed the title Don't compute FnAbi for LLVM intrinsics Don't compute FnAbi for LLVM intrinsics in backends Jan 8, 2026
@bjorn3
Copy link
Member Author

bjorn3 commented Jan 8, 2026

I've removed the removal of computing an FnAbi for extern "unadjusted" as miri still depends on it. Will remove it in a follow up PR.

Copy link
Contributor

@sayantn sayantn left a comment

Choose a reason for hiding this comment

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

}
_ => unreachable!(),
};
assert!(!fn_sig.c_variadic);
Copy link
Contributor

Choose a reason for hiding this comment

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

why this assertion? I mean I get the point that there are very few LLVM intrinsics that use vararg arguments, but I don't get what exactly fails for vararg functions

Copy link
Member Author

Choose a reason for hiding this comment

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

Because varargs are not handled. For varargs the LLVM function signature must only contain the non-varargs + an indication that the function is a vararg. Given that afaik we don't currently use any LLVM intrinsics that use varargs, I didn't implement that.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants