-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Don't special-case llvm.* as nounwind #144225
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
base: master
Are you sure you want to change the base?
Conversation
Certain LLVM intrinsics, such as `llvm.wasm.throw`, can unwind. Marking them as nounwind causes us to skip cleanup of locals and optimize out `catch_unwind` under inlining or when `llvm.wasm.throw` is used directly by user code. The motivation for forcibly marking llvm.* as nounwind is no longer present: most intrinsics are linked as `extern "C"` or other non-unwinding ABIs, so we won't codegen `invoke` for them anyway.
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs |
I'm not 100% sure there's no subtle issue here, even though |
r? @workingjubilee :) |
|
This looks reasonable to me.
LLVM intrinsics should generally use the |
Certain LLVM intrinsics, such as
llvm.wasm.throw
, can unwind. Marking them as nounwind causes us to skip cleanup of locals and optimize outcatch_unwind
under inlining or whenllvm.wasm.throw
is used directly by user code.The motivation for forcibly marking llvm.* as nounwind is no longer present: most intrinsics are linked as
extern "C"
or other non-unwinding ABIs, so we won't codegeninvoke
for them anyway.Closes #132416.
@rustbot label +T-compiler +A-panic