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

Lazily lower entities rather than iterating over all entities in SemIR #5037

Open
dwblaikie opened this issue Feb 27, 2025 · 0 comments
Open

Comments

@dwblaikie
Copy link
Contributor

dwblaikie commented Feb 27, 2025

Description of the bug:

We currently emit function forward declarations for totally unused/unreferenced function forward declarations.
This is unnecessary & we should avoid doing it, by having function and other entities emitted lazily - starting at the definitions, emitting declarations for anything those definitions call. Some of this is already implemented for emitting specialized generics and could be generalized further to handle the non-generic cases lazily as well.

(this was originally discovered with a crash on code like this: class C; fn F(c: C); where C has not been completed, has no value representation and lowering crashes expecting there to be one - this case may be fixed in other ways, though)

Discussed on discord starting here: https://discord.com/channels/655572317891461132/655578254970716160/1344750580840529982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant