Skip to content

[SIL] Add a "unique" flag to alloc_ref instructions. #32844

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

Closed
wants to merge 1 commit into from

Conversation

zoecarver
Copy link
Contributor

Adds a new flag to alloc_ref instructions. This flag, "unique",
signifies that the reference is unique meaning it is not stored
elsewhere and may not be written to elsewhere. This means accesses of
this reference may be "static" instead of "dynamic".

The uniqueness of the reference is enforced by the SILVerifier. This is good
because it may be run between each pass so errors will be easy to track
down.

Currently, the SILVerifier only supports a very few cases where it can
prove uniqueness, all other cases will end in an error. Later this
verifier check may be extended to be more robust.

Currently, the only way to mark a reference as unique is through textual
SIL. Later optimization passes may be added or updated to add this
information.

Forum post here. Refs #31423.

Adds a new flag to alloc_ref instructions. This flag, "unique",
signifies that the reference is unique meaning it is not stored
elsewhere and may not be written to elsewhere. This means accesses of
this reference may be "static" instead of "dynamic".

Uniqueness of the reference is enforced by the SILVerifier. This is good
because it may be run between each pass so errors will be easy to track
down.

Currently the SILVerifier only supports a very few cases where it can
prove uniqueness, all other cases will end in an error. Later this
verifier check may be extended to be more robust.

Currently the only way to mark a reference as unique is through textual
SIL. Later optimization passes may be added or updated to add this
information.
@shahmishal
Copy link
Member

Please update the base branch to main by Oct 5th otherwise the pull request will be closed automatically.

  • How to change the base branch: (Link)
  • More detail about the branch update: (Link)

@shahmishal shahmishal closed this Oct 5, 2020
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