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

New feature: DSE - Intelligent dead store? #64

Open
jcrodriguez1989 opened this issue Aug 20, 2019 · 1 comment
Open

New feature: DSE - Intelligent dead store? #64

jcrodriguez1989 opened this issue Aug 20, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@jcrodriguez1989
Copy link
Owner

If within a function, a variable is assigned multiple times, but just the last assignation is read, then the optimizer could keep just the last one.

For example:

foo <- function() {
  a <- 8
  a <- 8818
  return(a ^ 2)
}

Would be equivalent to:

foo <- function() {
  8
  a <- 8818
  return(a ^ 2)
}
@jcrodriguez1989 jcrodriguez1989 added the enhancement New feature or request label Aug 20, 2019
@saxenism
Copy link
Contributor

Hey @jcrodriguez1989 , I tried to implement this intelligent dead store elimination, please have a look at it here, https://github.com/hinduBale/intelligent_dead_store. If you deem fit, I can add it to the rco package along with some new tests.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants