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

Introduce SideEffect #75

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Introduce SideEffect #75

merged 3 commits into from
Oct 14, 2024

Conversation

Y-Nak
Copy link
Collaborator

@Y-Nak Y-Nak commented Oct 12, 2024

Please start reviewing after #69.

I've added the SideEffect enum. In the current implementation, only None, Read, Write can be specified. Read can be analogized to reading from memory. While it does not affect the state, it indicates that it can be influenced by the state. Write can be analogized to writing to memory, and it affects the state.

This is a very simple model, but it provides minimal necessary information for several optimizations, such as ADCE (Aggressive Dead Code Elimination) and instruction reordering, which I feel can have a relatively significant impact.

In the future, I would like to have a more rigorous model, and I plan to work on that in collaboration with Lane.

@Y-Nak Y-Nak requested a review from sbillig October 12, 2024 20:31
@Y-Nak Y-Nak mentioned this pull request Oct 13, 2024
Copy link
Collaborator

@sbillig sbillig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Y-Nak Y-Nak merged commit 495e3f7 into fe-lang:main Oct 14, 2024
10 checks passed
@Y-Nak Y-Nak deleted the side-effect branch October 14, 2024 09:11
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