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

Offset-based memory model #36

Open
langston-barrett opened this issue Aug 4, 2023 · 0 comments
Open

Offset-based memory model #36

langston-barrett opened this issue Aug 4, 2023 · 0 comments
Labels
feat New feature or request

Comments

@langston-barrett
Copy link
Collaborator

langston-barrett commented Aug 4, 2023

Right now, a pointer stored to a single, concrete field of a struct or index in an array will be retrieved in a load from any field or index. We should instead adopt a memory model that separates these. This would involve:

  • For each GEP expression and instruction with all concrete indices, calculating the offset added to the base pointer
  • For each (basic) allocation a, a new allocation a[*] which represents loads/stores at an unknown offset
  • "Sub-allocations" a[n] for concrete offsets n that have been calculated via GEPs - though care must be taken such that there is only a bounded number of such suballocations.
  • Rules relating loads and stores from the a[n] and a[*]

This would be a significant undertaking, and would require #37.

@langston-barrett langston-barrett added the feat New feature or request label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant