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

Abstract TwoWayMap to be able to be used for more usecases #1414

Closed
Tracked by #1376
jfecher opened this issue May 26, 2023 · 0 comments · Fixed by #1549
Closed
Tracked by #1376

Abstract TwoWayMap to be able to be used for more usecases #1414

jfecher opened this issue May 26, 2023 · 0 comments · Fixed by #1549
Labels
enhancement New feature or request refactor ssa

Comments

@jfecher
Copy link
Contributor

jfecher commented May 26, 2023

Problem

TwoWayMap in the SSA refactoring only maps between a value of type T and its corresponding Id<T>. This is too narrow to apply to other similar use cases in ACIR-gen or the SSA optimization passes.

Happy Case

We should change the inner maps of a TwoWayMap from HashMap<T, Id<T> and HashMap<Id<T>, T> to HashMap<K, V> and HashMap<V, K>. Then we could use this abstraction for more SSA passes and in ACIR-gen.

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@jfecher jfecher added the enhancement New feature or request label May 26, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 26, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor ssa
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants