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 in optimizer #4

Open
ozanh opened this issue Dec 16, 2020 · 0 comments
Open

constant propagation in optimizer #4

ozanh opened this issue Dec 16, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed priority: low

Comments

@ozanh
Copy link
Owner

ozanh commented Dec 16, 2020

As const declarations were introduced to uGO language, constant values should be propagated to expressions they are used in until they are shadowed. Optimizer does not create symbol tables but simple scopes which may help to propagate until a redefinition is encountered. Normally, users tend to avoid shadowing variables so constant value can be propagated most of the time.
This feature requires changes in both optimizer and compiler, and it should not extend the compilation process.

@ozanh ozanh added enhancement New feature or request help wanted Extra attention is needed labels Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed priority: low
Projects
None yet
Development

No branches or pull requests

1 participant