-
Notifications
You must be signed in to change notification settings - Fork 207
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
"Show LLVM IR" and "Show ASM" are missing some functions #1032
Comments
Interestingly, adding I wonder if this is related to rust-lang/rust#116505, Cc @saethlin |
Ah I guess this explains it. However that also says
Is that bug tracked anywhere? |
Almost certainly. See also 03c098a and https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.E2.9C.94.20Beta.20no.20longer.20creates.20assembly.20for.20small.20optimized.20libs |
No. Probably I should track the whole tangled mess of the reachability analysis, MIR inlining with its query cycle avoidance, MIR collection, instantiation modes, and the various exceptions to that whole system that are carved out for special functions. I'm barely smart enough to hack on this system, but I'm getting better. Right now all I can really do is point out that it's troubling, not do anything to improve it. But none of this is actually going to fix the situation for the playground and compiler explorer. People got used to the previous behavior of the compiler, where a hand-written It is entirely plausible that we add a compiler flag to produce the behavior that tools like the playground want. But I don't know how to get that stabilized (compiler explorer at least seems not that interested in using an unstable option to produce the old behavior), and in the current situation in the compiler I am not even sure how to implement it without perturbing optimization of functions that call a cross-crate-inlinable function. If you press "Show LLVM IR" or "Show ASM" in the playground and get different output than you do locally because locally you're not using a playground-only flag, that seems like it significantly degrades the value of this feature. |
That still seems worth an issue. Closing in favor of rust-lang/rust#119850. @shepmaster feel free to reopen if you want to keep this visible in the playground issue tracker as well. |
I tried this code:
Then I [edit: switched to release mode,] clicked "show LLVM IR" and expected to see the IR for this function.
However, the generated LLVM IR doesn't contain any function.
The text was updated successfully, but these errors were encountered: