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

Constant-propagation: propagate global values in “inline” context #541

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

vbgl
Copy link
Member

@vbgl vbgl commented Jul 24, 2023

This makes constant-propagation stronger: when global data (word or array) is accessed in an inline computation (assignment to inline variables, including inline arguments to (inline) functions), its value is computed at compile-time.

Caveat: global variables that are never accessed excepted in such “inline” situations are still present in the assembly code.

Fixes #540.

@vbgl vbgl force-pushed the constant-prop-global branch from fe3a32d to 4f04f42 Compare July 26, 2023 06:15
@vbgl vbgl marked this pull request as ready for review July 26, 2023 06:17
@bgregoir bgregoir merged commit 7c48429 into main Jul 31, 2023
@bgregoir bgregoir deleted the constant-prop-global branch July 31, 2023 07:48
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.

Inline & global do not work well together
2 participants