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

Experiment with addresses as constants in the new SSA refactoring #1413

Closed
Tracked by #1376
jfecher opened this issue May 26, 2023 · 2 comments
Closed
Tracked by #1376

Experiment with addresses as constants in the new SSA refactoring #1413

jfecher opened this issue May 26, 2023 · 2 comments
Labels
enhancement New feature or request refactor ssa

Comments

@jfecher
Copy link
Contributor

jfecher commented May 26, 2023

Problem

The use of absolute addresses in load and store instructions necessitates either backtracking when a load or store instruction is found to figure out which address it refers to, or keeping track of all allocations and arithmetic on them as you traverse the IR to keep track of addresses.

Happy Case

If addresses were instead represented as constants (without even an associated Allocate instruction) then they could be optimized to known values automatically. Then, the mem2reg and flatten_cfg passes wouldn't need any additional mapping/tracking of instructions to find which refer to known addresses and which do not.

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
@kevaundray
Copy link
Contributor

@jfecher can this be closed?

@jfecher
Copy link
Contributor Author

jfecher commented Jul 6, 2023

Yes, I've already experimented with it and it didn't help much. This was also when we could add on allocate instructions to get offsets which isn't possible anymore.

@jfecher jfecher closed this as completed Jul 6, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jul 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

No branches or pull requests

2 participants