Skip to content

Cranelift: Support stack probes without external function call #2299

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

Closed
bjorn3 opened this issue Oct 18, 2020 · 3 comments · Fixed by #4747
Closed

Cranelift: Support stack probes without external function call #2299

bjorn3 opened this issue Oct 18, 2020 · 3 comments · Fixed by #4747
Labels
cranelift Issues related to the Cranelift code generator

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Oct 18, 2020

Feature

LLVM has support for performing the stack probes directly in the function prologue instead of calling an external function. (see rust-lang/rust#77885 for using this in Rust)

Benefit

This can be faster due to being able to unroll the stack probe loop. It also avoids having to provide an external stack probe function. This makes it possible to enable stack probing in cg_clif. (https://github.com/bjorn3/rustc_codegen_cranelift/issues/661)

Implementation

This should only be implemented for the machinst backends. It should probably be added to either the gen_prologue implementation or gen_prologue caller.

Alternatives

Keep using an external stack probe function with the associated drawbacks.

@bjorn3
Copy link
Contributor Author

bjorn3 commented Sep 2, 2022

Neither AArch64, nor s390x has support for this yet.

@afonso360
Copy link
Contributor

Right, should we reopen this or open issues against both backends?

@bjorn3
Copy link
Contributor Author

bjorn3 commented Sep 2, 2022

Opened #4846 and #4847.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants