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

spirv: remove cache #19562

Merged
merged 8 commits into from
Apr 6, 2024
Merged

spirv: remove cache #19562

merged 8 commits into from
Apr 6, 2024

Conversation

Snektron
Copy link
Collaborator

@Snektron Snektron commented Apr 6, 2024

Now that we have the intern pool in Zig for cheap hashing/equality of types and values, and the deduplication pass (see #19490), we can get rid of SPIR-V's type/constant cache. There are still some cases where it is required, and for those situations we keep an ad-hoc cache of only those types (see cache in src/codegen/spirv/Module.zig).

This PR is based on #18984, so that should be merged first

@Snektron Snektron force-pushed the spirv-remove-cache branch 4 times, most recently from e4236bd to 8c07855 Compare April 6, 2024 11:04
@Snektron Snektron marked this pull request as ready for review April 6, 2024 11:04
@Snektron Snektron force-pushed the spirv-remove-cache branch 2 times, most recently from 2f6d954 to 2d778cc Compare April 6, 2024 11:29
This allows us to more sanely allocate a continuous
range of result-ids, and avoids a bunch of nasty
casting code in a few places. Its currently not used
very often, but will be useful in the future.
@andrewrk
Copy link
Member

andrewrk commented Apr 6, 2024

Nice. I think it's a good decision.

@andrewrk andrewrk merged commit f45ba7d into ziglang:master Apr 6, 2024
10 checks passed
@Snektron Snektron deleted the spirv-remove-cache branch April 6, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants