Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler: Implement @disableIntrinsics() builtin function. #22154

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Dec 5, 2024

This implements #22110, and in a way that also satisfies the use case for #21833. If accepted, this would therefore supersede #21900.

I won't add any usage of this builtin to compiler-rt and std yet as this will require a zig1.wasm update.

Closes #21833.
Closes #22110.

@wooster0
Copy link
Contributor

wooster0 commented Dec 6, 2024

Might be nice to add docs for this in the langref as well, along with disableInstrumentation maybe? (#21424)

I won't add any usage of this builtin to compiler-rt and std yet

Or I guess it can be done then

@alexrp
Copy link
Member Author

alexrp commented Dec 6, 2024

Will write docs if/when it's approved.

@alexrp alexrp added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Dec 6, 2024
@alexrp alexrp force-pushed the disable-intrinsics branch from 45ffc0f to 5fe1fe6 Compare December 7, 2024 12:56
@alexrp alexrp force-pushed the disable-intrinsics branch 2 times, most recently from b9a6861 to c45775b Compare January 24, 2025 02:47
Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

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

Looks good other than this strange snippet I see here

@alexrp alexrp force-pushed the disable-intrinsics branch from c45775b to e11ac02 Compare February 23, 2025 03:09
@alexrp
Copy link
Member Author

alexrp commented Feb 23, 2025

@andrewrk do you have any thoughts on nuking -fno-builtin (a rather blunt instrument) in favor of requiring explicit usage of @disableIntrinsics() where necessary? (Would be follow-up work since it needs a zig1.wasm update.)

@alexrp alexrp added this to the 0.14.0 milestone Feb 23, 2025
@andrewrk
Copy link
Member

Yeah I'm in favor

@alexrp alexrp enabled auto-merge February 23, 2025 03:33
@andrewrk
Copy link
Member

andrewrk commented Feb 23, 2025

alexrp enabled auto-merge 2 minutes ago

you have the patience of a saint

@alexrp
Copy link
Member Author

alexrp commented Feb 23, 2025

👼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: @disableIntrinsics() builtin function Proposal: Add never_intrinsify to std.builtin.CallModifier
3 participants