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

eliminate common prefixes/suffixes in conditionals using CFG #82

Open
michaelficarra opened this issue Jun 24, 2013 · 0 comments
Open

Comments

@michaelficarra
Copy link
Member

if(condition){
  a();
  b();
} else {
  c();
  b();
}

b will be called unconditionally, so it can be taken out.

if(condition) a(); else c();
b();

This will be easy when we generate control flow graphs. Any equivalent nodes that both point at the same node (and any node that points to two equivalent nodes) can be optimised.

Let's try out https://github.com/Swatinem/esgraph

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

No branches or pull requests

1 participant