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

Fix dead code elimination used in tests #11

Merged
merged 1 commit into from
Jul 9, 2015

Conversation

michalt
Copy link
Contributor

@michalt michalt commented Jul 5, 2015

The helper functions to fold over instructions and expressions in
test/OptSupport have a bug where they would not recurse for complex
expressions. And since testing/Live module depends on it, complex
expressions would not be fully analyzed, leading to removal of code
that is not dead, e.g.,

  var1 = m[0]
  var1 = m[var1] + m[var1]

would get rewritten to just

  var1 = m[var1] + m[var1]

which is clearly wrong.

Note that this bug affects only Hoopl's tests.

The helper functions to fold over instructions and expressions in
test/OptSupport have a bug where they would not recurse for complex
expressions. And since testing/Live module depends on it, complex
expressions would not be fully analyzed, leading to removal of code
that is *not* dead, e.g.,
  var1 = m[0]
  var1 = m[var1] + m[var1]
would get rewritten to just
  var1 = m[var1] + m[var1]
which is clearly wrong.

Note that this bug affects only Hoopl's tests.
@mlite mlite merged commit 782ffec into haskell:master Jul 9, 2015
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.

None yet

2 participants